Problem installing Live USB on a USB key

You have a problem with Salix? Post here and we'll do what we can to help.
phayz
Posts: 62
Joined: 24. Nov 2010, 21:06

Problem installing Live USB on a USB key

Post by phayz »

OK - I have read the SalixOS Startup Guide several times and followed the instructions on how to get a live USB installation from the Live ISO. I can open the ISO, copy all the files and folders onto a USB key. I then run install-on-USB.cmd but get an error message saying there's not enough free space beyond the MBR. I have apparently something like 48 sectors and need at least 64 sectors (or words similar to those). The instructions recommend I run parted, which I do, but it fails to resize anything.

I was really impressed with SalixOS when I found creating a Live USB installation so easy but now I can't do it. :( I wonder if the first time I did it from an ISO burnt on media rather than from a Live USB?

Has anyone else run into this problem? If so is there anything I can do to fix the problem?
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: Problem installing Live USB on a USB key

Post by Akuna »

As the error message states, the problem is with the formatting of your USB key, specifically the mbr gap which is not big enough for grub2.

This should be fixable.
How exactly did you run parted in order to fix it? Also, did you create a new partition table?
Image
What really matters is where you are going, not where you come from.
phayz
Posts: 62
Joined: 24. Nov 2010, 21:06

Re: Problem installing Live USB on a USB key

Post by phayz »

Akuna,

Thanks for your reply. The script itself tried running parted and quoted the command it was trying to use. Since the USB key was where I was running the script from, parted refused to work. Its' suggestion was that I unmount the USB key and try again. Of course without the USB key mounted I couldn't get access to parted etc. I tried running the script under both Windows and other Linux distribution.

I didn't create a new partition table explicitly. Regarding formatting of the USB key I did this under Windows (XP), doing both a Quick Format and a normal format.

I haven't yet tried another USB key so perhaps I ought to try that as well. I'll do this and report the results here.
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: Problem installing Live USB on a USB key

Post by Akuna »

To get the end sector:

Code: Select all

parted /dev/your-usb-device unit s print | grep '^ 1' | awk '{print $3}'
To enlarge your post mbr gap:

Code: Select all

parted /dev/your-usb-device resize 1 63s the-end-sector-you-got-above
Image
What really matters is where you are going, not where you come from.
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Problem installing Live USB on a USB key

Post by JRD »

Or use a decent partition tool software (any OS), delete the partition on your USB key and recreate one with MS-DOS compatibility (if this is mentionned in the software). It should let the necessary gap before the first partition.
Image
phayz
Posts: 62
Joined: 24. Nov 2010, 21:06

Re: Problem installing Live USB on a USB key

Post by phayz »

JRD and Akuna,

Thanks for your responses. I am yet to get back to trying this again, although I am very keen. I'm currently spending all my time on installing Salix 13.37. :D

I'll need to find a decent partitioning tool. Perhaps I'll try Parted Magic next time?
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: Problem installing Live USB on a USB key

Post by Akuna »

Gparted is on the repo
Image
What really matters is where you are going, not where you come from.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Problem installing Live USB on a USB key

Post by mimosa »

When I've had this sort of problem before, wiping the USB and reformatting has always done the trick.
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: Problem installing Live USB on a USB key

Post by pwatk »

This might be a bit hackish but this is the basics of what I do. Use it or not, it might help in some way.

Wipe the disk:

Code: Select all

dd if=/dev/zero of=/dev/sdX bs=512 count=1
Replace /dev/sdX with the correct device for your USB stick.

Create FAT32 LBA partition:

Code: Select all

cfdisk /dev/sdX
Change the partition type to C

Format the partition:

Code: Select all

mkdosfs -F 32 -n Salix /dev/sdX
At this point you should be able to mount the USB stick.

Copy the Salixlive ISO image (yes the ISO image) to your USB stick, extract the boot directory to the root of the disk and create a text file called syslinux.cfg.

You should now have something like this on your USB stick:

Code: Select all

/boot
/salixlive-xfce-13.1.2.iso
/syslinux.cfg
Copy the following into syslinux.cfg:

Code: Select all

default menu.c32
prompt 0
menu title Salix Live USB

label salixlive
  menu label Salix live 13.1.2
  kernel /boot/vmlinuz
  append initrd=/boot/initrd.gz vga=791 root=/dev/ram0 rw quiet 4 from=/salixlive-xfce-13.1.2.iso
Add syslinux menu.c32 (the syslinux package should already be installed):

Code: Select all

cp /usr/share/syslinux/menu.c32 /media/Salix
Replace /media/Salix if the mount point for your USB stick is different.

***Unmount the USB stick now****

Add syslinux MBR to the USB stick:

Code: Select all

cat /usr/share/syslinux/mbr.bin > /dev/sdX
Install syslinux to the USB stick:

Code: Select all

syslinux /dev/sdX
Done

You'll now have a rather ugly menu (beautifying it can be something to research later) with one option to boot the live CD from the ISO image on the USB stick.

You can also add commands to the append= line in syslinux.cfg to control different boot options.

For example, this sets the locale, sets the keymap, copys everything to RAM and turns off numlock and synaptics:

Code: Select all

append initrd=/salixlive/initrd.gz vga=791 root=/dev/ram0 rw quiet lang=en_GB.utf8 keyb=uk 4 toram numlock=off synaptics=off from=/salixlive-xfce-13.1.2.iso
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Problem installing Live USB on a USB key

Post by JRD »

This is working (and you don't need to wipe the disk to use this method). But it's not a supported method because the grub menu is not there and you should add any parameters by yourself. Furthermore, if you upgrade later to another version, you should reinstall syslinux.
We may provide a way to chainload from syslinux to grub2 in the future, so you will have the possibility to install it quite easily and have all the options of grub2. Of course you will have some drawbacks of using syslinux but it could help if installing grub2 is difficult.
Image
Post Reply