Salix Live Xfce 13.37 RC2

User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Salix Live Xfce 13.37 RC2

Post by JRD »

The Live team is proud to present the second release candidate of Salix Live Xfce 13.37. Hopefully, this will be the last one before the final release.
This serve as a base for other flavours: as you may have already seen, a KDE beta1 version was built using the new SaLT (Salix Live Technology) system.
Like with the previous rc version, a lot of corrections have been brought, both to the SaLT system and to the live tools (Live Installer, LiloSetup, LiveClone and Persistence Wizard).
Among the bugs corrected, the most annoying ones were:
  • weird mountpoints was shown in the peristence wizard
  • possibility to keep changes directly (without a first reboot) while setting the peristence file if it's big enough
  • installation error with lilosetup in some configurations
  • loopback.cfg is now fully supported, either with the limited grub2 1.98 and with the grub2 1.99+
  • one can install multiple SaLT system on the same media (USB disk, harddisk, remastered CD/DVD) using the configuration in the .live file (basedir variable)
  • power down/reboot problem was hanging in some situations
  • no weird message "# is not a proper command" on grub menu loading
  • missing header in kernelive that prevented to install VirtualBox or VMWare additions without installing kernel-source. Same for nvidia/ati prorietary drivers.
  • max_loop kernel parameter has been set to 20 per default to prevent the error "could not find any free loop device" in some circumstances
So here are the downloadable files: P.S. The default user is still one with no password, and the root password is still live.
Image
ikke
Posts: 263
Joined: 5. Feb 2010, 22:47

Re: Salix Live Xfce 13.37 RC2

Post by ikke »

Cannot but congratulate you with this RC2. And thank you. Merci beaucoup!

Have done a frugal install of this RC2. And at first sight everything works fine. But it is to early to make definitive statements ...

Will let you have more comments after a couple of days of testing.

Once more : thank you.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Salix Live Xfce 13.37 RC2

Post by mimosa »

Would it be possible for there to be a torrent for this, as discussed here:

http://www.salixos.org/forum/viewtopic. ... ent#p17927
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Salix Live Xfce 13.37 RC2

Post by mimosa »

Finally managed to download this, and I'm having trouble installing directly to USB (following the instructions on the wiki):

Code: Select all

root[Salix Live]# ls
boot  packages  salix-xfce-13.37-32-rc2.live  salixlive
root[Salix Live]# cd boot
root[boot]# ./install-on-USB.sh
Error: You need to put the .live file from the iso into the root of the usb key Error: Could not find mountpoint for: /media/Salix Live/boot
root[boot]# 
Before trying, I wiped the 4GB stick and formatted as fat16.

I'll now burn a CD and try using LiveClone, so please regard this post as for info only.

A guess: the script doesn't like the space in the volume name.
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Salix Live Xfce 13.37 RC2

Post by Shador »

Yes, surprisingly this and something else were not caught by anybody when applying some changes to improve reliability and to add subdir handling. This version should work as long as you have no newlines in your filename. ;)

Code: Select all

#!/bin/sh
cd $(dirname $0)

VER=1.6
AUTHOR='Pontvieux Cyrille - jrd@enialis.net'
LICENCE='GPL v3+'
SCRIPT="$(basename "$0")"
SCRIPT="$(readlink -f "$SCRIPT")"

version() {
  echo "install-on-USB v$VER by $AUTHOR"
  echo "Licence : $LICENCE"
  echo '-> Install grub2(+syslinux) on an USB key using an ISO or the USB key itself.'
}

usage() {
  version
  echo ''
  echo 'usage: install-on-USB.sh [-h/--help] [-v/--version]'
  exit 1
}

get_mnt_dir() {
  # need to support space even in loops
  OIFS="$IFS"
  # we need to make a real newline and only a real newline
  #  (no space, ...) here to make this reliably work
  IFS='
'
  # sort reverse order so we try submounts first
  mounts=$(mount | sed -e 's/^.* on \(.*\) type.*$/\1/' | sort -dur)
  startdir="$PWD"
  unset mntdir
  while [ "$PWD" != "/" ]; do
    for m in $mounts; do
      if [ "$PWD" == "$m" ]; then
        echo "$m"
        cd "$startdir"
        return
      fi
    done
    cd ..
  done
  IFS="$OFIS"
  # should never reach here
  echo "Error: Could not find mountpoint for: $startdir" >&2
  exit 2
}

get_dev_part() {
  MNTDIR="$1"
  DEVPART=$(mount | grep "on $MNTDIR " | cut -d' ' -f1 | head -n 1)
  if [ -z "$DEVPART" ]; then
    echo "Error: $MNTDIR doesn't seem to be mounted" >&2
    exit 2
  elif ([ "$(echo $DEVPART | awk '{s=substr($1, 1, 1); print s;}')" != "/" ] || [ ! -r "$DEVPART" ] || [ ! -b "$DEVPART" ]); then
    echo "Error: $DEVPART detected as a the device of" >&2
    echo "  $MNTDIR but seems invalid." >&2
    exit 2
  fi
  echo $DEVPART
}

get_partition_num() {
  DEVPART="$1"
  echo $DEVPART|sed 's/^.*[^0-9]\([0-9]*\)$/\1/'
}

get_dev_root() {
  DEVPART="$1"
  PARTNUM="$2"
  DEVROOT=$(echo $DEVPART|sed "s/$PARTNUM\$//")
  if ([ "$(echo $DEVROOT | awk '{s=substr($1, 1, 1); print s;}')" != "/" ] || [ ! -r "$DEVROOT" ] || [ ! -b "$DEVROOT" ]); then
    echo "Error: $DEVROOT detected as a the root device of" >&2
    echo "  $DEVPART but seems invalid." >&2
    exit 2
  fi
  echo $DEVROOT
}

install_syslinux() {
  DIR="$1"
  DEVICE="$2"
  DEVPART="$3"
  PARTNUM="$4"
  BASEDIR="$5"
  img="$DIR/${BASEDIR}boot/grub2-linux.img"
  relimg="${BASEDIR}boot/grub2-linux.img"
  if ! [ -f "$img" ]; then
    echo "Error: Could not find the image file: $img"
    exit 2
  fi
  which syslinux >/dev/null 2>&1
  if [ $? -ne 0 ]; then
    echo "Error: syslinux is not available on your system." >&2
    echo "  Installation on your USB key is therefore impossible." >&2
    exit 2
  fi
  which parted >/dev/null 2>&1
  if [ $? -ne 0 ]; then
    echo "Error: parted is not available on your system." >&2
    echo "  Installation on your USB key is therefore impossible." >&2
    exit 2
  fi
  echo "Warning: syslinux+grub2 is about to be installed in $DEVICE"
  # check if we hit an unpartitioned stick e.g. fat fs directly on
  # /dev/sdc without /dev/sdc1
  if [ "$DEVPART" != "$DEVICE" ]; then
    echo "on partition $DEVPART"
  fi
  printf "Do you want to continue? [y/N] "
  read R
  if ([ "$R" = "y" ] || [ "$R" = "Y" ]); then
    signature="$(dd if=$DEVICE bs=1 count=2 skip=510 2>/dev/null | od -t x1 | tr '\n' ' ')"
    if [ "$signature" != "0000000 55 aa 0000002 " ]; then
      # no valid mbr magic 0x55 0xAA
      echo "Error: $DEVICE does not contain a valid MBR."
      echo "For safety reasons we won't install to such a media."
      exit 3
    fi
    bakfile="$DIR/${BASEDIR}boot/"$(echo $DEVICE|tr '/' '_').mbr.$(date +%Y%m%d%H%M)
    echo "Backing up mbr of $DEVICE to '$bakfile'..."
    dd if=$DEVICE of="$bakfile" bs=512 count=1
    echo "Installing syslinux..."
    syslinux $DEVPART
    if [ "$DEVPART" != "$DEVICE" ]; then
      echo  "Do you want to overwrite the MBR loader (first 440 bytes)"
      echo "of the disk? Recommended unless you know the code in there"
      printf "already does what you want. [y/N] "
      read R
      if ([ "$R" = "y" ] || [ "$R" = "Y" ]); then
        # this makes parted write a mbr loader
        dd if=/dev/zero of=$DEVICE bs=1 count=1
      fi
      echo "Setting bootable flag of $DEVPART..."
      parted $DEVICE set $PARTNUM boot on
    fi
    sync
    cat <<EOF > "$DIR"/syslinux.cfg
DEFAULT grub2
PROMPT 0
NOESCAPE 1
TOTALTIMEOUT 1
ONTIMEOUT grub2
LABEL grub2
  SAY Chainloading to grub2...
  LINUX $relimg
EOF
  fi
}

run_as_root() {
  if which gksu >/dev/null 2>&1; then
    exec gksu "$@"
  else
    exec "$@" # will fail
  fi
}

# check if we are run non-interactive (e.g. from file manager)
if [ ! -t 0 ]; then
  CMD="/bin/sh -c '$SCRIPT; echo Press enter to exit; read;'"
  if which xterm >/dev/null 2>&1; then
    run_as_root xterm -e $CMD
  fi
fi

if ([ "$1" = "--version" ] || [ "$1" = "-v" ]); then
  version
  exit 0
fi
if ([ "$1" = "--help" ] || [ "$1" = "-h" ]); then
  usage
fi
if [ $(id -ru) -ne 0 ]; then
  echo "Error : you must run this script as root" >&2
  exit 2
fi
MNTDIR=$(get_mnt_dir); [ $? -ne 0 ] && exit $?
if [ ! -f "$MNTDIR/"*.live ]; then
  echo "Error: You need to put the .live file from the iso into the root of the usb key $MNTDIR"
  exit 2
fi
BASEDIR=$(cd ..; echo $PWD | sed -e "s:$MNTDIR::" -e "s:^/::")
if [ -n "$BASEDIR" ]; then
	BASEDIR="$BASEDIR/"
fi
DEVPART=$(get_dev_part "$MNTDIR"); [ $? -ne 0 ] && exit $?
PARTNUM=$(get_partition_num "$DEVPART"); [ $? -ne 0 ] && exit $?
DEVROOT=$(get_dev_root "$DEVPART" "$PARTNUM"); [ $? -ne 0 ] && exit $?
install_syslinux "$MNTDIR" $DEVROOT $DEVPART $PARTNUM "$BASEDIR"
exit 0
Can you please test and report back, so I can commit this for future builds. Thanks for your help.
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Salix Live Xfce 13.37 RC2

Post by mimosa »

Shador, I will try and test that tomorrow morning. But afterwards, I gave the stick a more sensible name, and the script worked. However, it wouldn't boot! A different stick (13.1) still boots fine on that machine. I then tried LiveClone, which appeared to exit successfully (though a clearer message would be nice). However, the result was the same: just a flashing cursor at the top left of the screen, i.e. it never gets as far as Grub.

I also just tried on another machine, same result.

Apart from that, when I updated and upgraded with slapt-get, lilosetup 3.0 was downgraded to 2.9. something.

The LiveCD appears to boot much faster than before, even faster than 13.31 live on USB :D

Could this have anything to do with the fact that I formated as fat16 not fat32? I don't know why I did, but fat16 is good up to 4GB, right?
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Salix Live Xfce 13.37 RC2

Post by Shador »

mimosa wrote: However, the result was the same: just a flashing cursor at the top left of the screen, i.e. it never gets as far as Grub.
Hard to say from that what's going wrong. Can you try to describe as exactly as possible what's happening? It's booting fine here. The big difference regarding booting between 13.1 and 13.37 is that in 13.1 grub2 was installed directly to the MBR and post-MBR gap while now with 13.37 syslinux is installed there and loads a grub2 image from the fs.

As the problem appears on two machines, I'd guess it's related to the stick somehow. Can you try to collect information about it.

Code: Select all

fdisk -l <dev>
parted <dev> print
dd if=<dev> of=mbr bs=512 count=1
ls -R <mountpoint>
Post the output and upload the mbr file somewhere.
mimosa wrote:Could this have anything to do with the fact that I formated as fat16 not fat32? I don't know why I did, but fat16 is good up to 4GB, right?
It shouldn't matter. But you could try.
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Salix Live Xfce 13.37 RC2

Post by mimosa »

Thanks Shador! :) OK, here's the output you requested:

Code: Select all

vanilla[~]$  ls -R /media/SalixLiveUS/
/media/SalixLiveUS/:
boot/  ldlinux.sys*  salixlive/  salixliveusb-2012-01-06.live*  syslinux.cfg*

/media/SalixLiveUS/boot:
eltorito.img*  g2ldr*  g2ldr.mbr*  grub/  grub.cat*  grub2-linux.img*  initrd.xz*  install-on-USB.cmd*  install-on-USB.sh*  mt86p*  syslinux.exe*  vmlinuz*

/media/SalixLiveUS/boot/grub:
bg.png*  boot.cfg*  cheatcode.cfg*  grub.cfg*  i386-pc/  include.cfg*  keyboard.cfg*  keymaps/  lang.cfg*  locale/  loopback.cfg*  memdisk_grub.cfg*  salt.env*  simpleboot.cfg*  unicode.pf2*

/media/SalixLiveUS/boot/grub/i386-pc:
acpi.mod*          cmostest.mod*                 font.mod*             gcry_twofish.mod*    keylayouts.mod*  moddep.lst*      password_pbkdf2.mod*  sendkey.mod*        usbms.mod*
affs.mod*          cmp.mod*                      fs.lst*               gcry_whirlpool.mod*  keystatus.mod*   msdospart.mod*   pbkdf2.mod*           serial.mod*         usbserial_common.mod*
afs.mod*           command.lst*                  fshelp.mod*           gettext.mod*         legacycfg.mod*   multiboot.mod*   pci.mod*              setjmp.mod*         usbserial_ftdi.mod*
afs_be.mod*        configfile.mod*               functional_test.mod*  gfxmenu.mod*         linux.mod*       multiboot2.mod*  play.mod*             setpci.mod*         usbserial_pl2303.mod*
aout.mod*          cpio.mod*                     g2hdr.img*            gfxterm.mod*         linux16.mod*     nilfs2.mod*      png.mod*              sfs.mod*            usbtest.mod*
at_keyboard.mod*   cpuid.mod*                    gcry_arcfour.mod*     gptsync.mod*         lnxboot.img*     normal.mod*      probe.mod*            sleep.mod*          vbe.mod*
ata.mod*           crypto.lst*                   gcry_blowfish.mod*    grldr.img*           loadenv.mod*     ntfs.mod*        pxe.mod*              tar.mod*            vga.mod*
ata_pthru.mod*     crypto.mod*                   gcry_camellia.mod*    grub.cfg*            loopback.mod*    ntfscomp.mod*    pxeboot.img*          terminal.lst*       vga_text.mod*
befs.mod*          cs5536.mod*                   gcry_cast5.mod*       gzio.mod*            ls.mod*          ntldr.mod*       pxecmd.mod*           terminal.mod*       video.lst*
befs_be.mod*       date.mod*                     gcry_crc.mod*         halt.mod*            lsacpi.mod*      ohci.mod*        raid.mod*             terminfo.mod*       video.mod*
biosdisk.mod*      datehook.mod*                 gcry_des.mod*         hashsum.mod*         lsapm.mod*       part_acorn.mod*  raid5rec.mod*         test.mod*           video_bochs.mod*
bitmap.mod*        datetime.mod*                 gcry_md4.mod*         hdparm.mod*          lsmmap.mod*      part_amiga.mod*  raid6rec.mod*         test_blockarg.mod*  video_cirrus.mod*
bitmap_scale.mod*  diskboot.img*                 gcry_md5.mod*         hello.mod*           lspci.mod*       part_apple.mod*  read.mod*             testload.mod*       video_fb.mod*
blocklist.mod*     dm_nv.mod*                    gcry_rfc2268.mod*     help.mod*            lvm.mod*         part_bsd.mod*    reboot.mod*           tga.mod*            videoinfo.mod*
boot.img*          drivemap.mod*                 gcry_rijndael.mod*    hexdump.mod*         mdraid09.mod*    part_gpt.mod*    regexp.mod*           trig.mod*           videotest.mod*
boot.mod*          echo.mod*                     gcry_rmd160.mod*      hfs.mod*             mdraid1x.mod*    part_msdos.mod*  reiserfs.mod*         true.mod*           xfs.mod*
bsd.mod*           efiemu.mod*                   gcry_seed.mod*        hfsplus.mod*         memdisk.mod*     part_sun.mod*    relocator.mod*        udf.mod*            xnu.mod*
btrfs.mod*         elf.mod*                      gcry_serpent.mod*     iorw.mod*            memrw.mod*       part_sunpc.mod*  scsi.mod*             ufs1.mod*           xnu_uuid.mod*
bufio.mod*         example_functional_test.mod*  gcry_sha1.mod*        iso9660.mod*         minicmd.mod*     partmap.lst*     search.mod*           ufs2.mod*           xzio.mod*
cat.mod*           ext2.mod*                     gcry_sha256.mod*      jfs.mod*             minix.mod*       parttool.lst*    search_fs_file.mod*   uhci.mod*           zfs.mod*
cdboot.img*        extcmd.mod*                   gcry_sha512.mod*      jpeg.mod*            minix2.mod*      parttool.mod*    search_fs_uuid.mod*   usb.mod*            zfsinfo.mod*
chain.mod*         fat.mod*                      gcry_tiger.mod*       kernel.img*          mmap.mod*        password.mod*    search_label.mod*     usb_keyboard.mod*

/media/SalixLiveUS/boot/grub/keymaps:
cz.gkb*  de.gkb*  dk.gkb*  es.gkb*  fr-latin9.gkb*  gr.gkb*  hu.gkb*  il.gkb*  it.gkb*  lt.gkb*  nl.gkb*  pl.gkb*  ua.gkb*  us.gkb*

/media/SalixLiveUS/boot/grub/locale:
ast.mo*          da_DK.utf8.cfg*  en_GB.utf8.cfg*  fi.mo*           hu.mo*           it_IT.utf8.cfg*  nl.mo*           pt_BR.utf8.cfg*  sv.mo*           uk_UA.utf8.cfg*
ca.mo*           de.mo*           en_US.cfg*       fr.mo*           hu_HU.utf8.cfg*  ja_JP.utf8.cfg*  nl_NL.utf8.cfg*  pt_PT.utf8.cfg*  sv_SE.utf8.cfg*  vi.mo*
cs_CZ.utf8.cfg*  de_DE.utf8.cfg*  es_AR.utf8.cfg*  fr_FR.utf8.cfg*  id.mo*           ko.mo*           pl.mo*           ru.mo*           tr_TR.utf8.cfg*  zh_CN.mo*
da.mo*           el_GR.utf8.cfg*  es_ES.utf8.cfg*  he.utf8.cfg*     it.mo*           lt_LT.utf8.cfg*  pl_PL.utf8.cfg*  ru_RU.utf8.cfg*  uk.mo*

/media/SalixLiveUS/salixlive:
modules/  persistence/

/media/SalixLiveUS/salixlive/modules:
01-clone.salt*

/media/SalixLiveUS/salixlive/persistence:
salixlive.save*
Of the first two, to my untutored eye, the output of fdisk looks like bad news:

Code: Select all

Disk /dev/sdb1: 4021 MB, 4021288960 bytes
124 heads, 62 sectors/track, 1021 cylinders, total 7854080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb0bcd68e

This doesn't look like a partition table
Probably you selected the wrong device.

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   ?  3223366781  3470046704   123339962   78  Unknown
/dev/sdb1p2   ?   432871117  1208554935   387841909+  10  OPUS
/dev/sdb1p3   ?  1869562563  3788792630   959615034   8b  Unknown
/dev/sdb1p4   ?  3941072896  3949396013     4161559    a  OS/2 Boot Manager

Partition table entries are not in disk order
Finally:

Code: Select all

root[vanilla]# parted /dev/sdb1 print
Model: Unknown (unknown)
Disk /dev/sdb1: 4021MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  4021MB  4021MB  fat32
I'll look into the mbr tomorrow, if you still want to see it. But my guess is this will be enough to condemn the stick.

To recap, I used gparted to delete the existing FAT partition and create a new one. My inclination now is to use dd to fill it with zeros and start again.

This is a memory stick my wife has been using for ages under Windows, quite possibly riddled with viruses.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Salix Live Xfce 13.37 RC2

Post by mimosa »

The script fails with this message:

Code: Select all

root[boot]# ./shador.sh 
./shador.sh: line 36: syntax error near unexpected token `do'
./shador.sh: line 36: `   while [ "$PWD" != "/" ]; do'
root[boot]# 
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Salix Live Xfce 13.37 RC2

Post by Shador »

With dev I was not meaning the partition, but the device for the whole drive, i.e. /dev/sdb. Please use that for dev and repost.
mimosa wrote:The script fails with this message:

Code: Select all

root[boot]# ./shador.sh 
./shador.sh: line 36: syntax error near unexpected token `do'
./shador.sh: line 36: `   while [ "$PWD" != "/" ]; do'
root[boot]# 
Something must have gone wrong when you copied the script. Try downloading it from here: http://gaia.homelinux.org/misc/install-on-USB.sh
Image
Locked