News

Sponsor

hetzner.de

Donate

Last 3 Contributions
07-02-2010 30.00
07-02-2010 15.00
06-02-2010 3.00

Donate

Languages

Contents
Credits

Pre-amble

BIOS, USB and RAM issues

fll-iso2usb

Test

Errors


Credits


Joaquim Boura

Kel Modderman

(The script authors)

Pre-amble


There may be reasons why you need isofile on usb hard drive. They include:
You have a netbook and have no optical or floppy drive
You can not use optical or floppy drive to do a net install
You wish to demonstrate it to your friends.

How you intend to use it can vary as well.

It could be a dual purpose, bootable system and storage for current hard drive files.
Single purpose bootable system, with or without persistance.
Running completely in RAM or not.


BIOS, USB and RAM issues


Firstly can your bios be configured to allow usb hard drives to be in the booting order?
This means that your bios needs to detect the usb is bootable and secondly the firmware allows it to be in booting order.

Insert your usb stick.

Read your motherboard manual to find out how to get into bios. (Mine is hit the delete key) Then I go to advanced setup and then go into hard drive disks.
Then press enter for first selection and choose which drive is to be first (and second and so on)

image

Press Escape to go back to advanced setup screen and select your other options. Here...for illustration purposes only ...I have no floppy no optical drive in boot order
and screen shows only usb device. This may seem misleading if you do not have it plugged in...but remember its the hard drive boot order screen.
(I have highlighted in red the sub-menu hard disk drives which I had to enter to configure as above)

image

USB can come in different speeds and sizes. Cheap storage sticks often are USB 2 devices and can range in size, from 1G or 8G and higher.
Older sticks that are 1.1 standard will not make good demo units. I have not seen any USB 3 drives myself but they do exist.
No link to be provided to minimise 3rd party wiki rules....and not breach advertising rule.

The size of USB impacts on free space left.

eg

 df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdc1             474M  474M     0 100% /media/siduxUSB


Above was an attempt to write to a 512 M stick using xfce where I forgot to check free space before starting the process. If I had run gparted before starting I would have seen free space was less that iso size of 505.6 M ...it was actually 486 Megs....but that tells me, I was going to fail.

TIP check size of iso and size of free space on USB before starting!

XFCE users will have speedier boots relative to KDE users. And as transfer speeds are slower for USB, the boot ups can be more noticeable.

The size of your RAM will impact on the ability to run the USB device from RAM only.

Leaping ahead, after 2009-02 XFCE was installed, size of disk used was 528 M....so the min stick you need is 1G. KDE-lite is roughly the same size but KDE-full is about 2.1G so will need a 4 G stick or larger


fll-iso2usb.bash


Is gui front end to script fll-iso2usb...run...install-usb-gui.bash

image

It seems to warn that you have to format independently before using gui....this may change but the script way is better as it formats and gives feedback.

I prefer the command way or cli way as per below. If you choose to use the gui....in case you make mistakes...please ensure you have backups of any files on usb stick saved elsewhere. The gui way seems to prefer to take over the whole disk. I stopped investigating it when I found I was able to use below commands and succeed.




fll-iso2usb


Run man fll-iso2usb to see what options are available to you.

Follow my example for a 4 G stick. Check free space is ok for target partition using gparted...ok

Decide if you are going to use persistence = configs saved for reboot or not. Decide if you can run entirely in RAM or not. Decide if you want certain cheatcodes to be INBUILT to menuline or not.

I decided to try persistence with no initial setup of ram but reboot with toram cheatcode.

Stage 1

Insert stick and run gparted to create 2 partitions. Do not mount the stick or external usb device before running gparted or your partition tool please.
My first usb partition I made it 700 Megs and balance is for normal hard drive booted up storage.
Gparted reported first partition free space 686 M. (size of isofile is 506 M) This means if I was to do any real work, I need to be careful with size of temp file.
Also I need to use -n switch in next command to stop the script was attempting to create a new partition table with a single partition! But it also means I need to use gparted or some other tool to format prior to running the script.

Stage 2

Open terminal and run "researched" command with root powers

sux
fll-iso2usb -D /dev/sdb -I /home/gordy/sidux.iso -n -p lang=au


O: using partition /dev/sdb1
O: mounting /dev/sdb1 on /tmp/install-usb.OXX70c
O: mount point ready: /tmp/install-usb.OXX70c
/tmp/install-usb.OXX70c
O: installing grub on /dev/sdb
Installation finished. No error reported.
This is the contents of the device map /tmp/install-usb.OXX70c/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0)	/dev/sda
(hd1)	/dev/sdb
O: grub successfully installed to /dev/sdb
O: mounting iso: /home/gordy/sidux.iso
O: iso mounted on /tmp/install-usb-iso.BguL2B
O: copying files to /tmp/install-usb.OXX70c
`/tmp/install-usb-iso.BguL2B/boot/initrd.img-2.6.30-1.slh.3-sidux-686' -> `/tmp/install-usb.OXX70c/boot/initrd.img-2.6.30-1.slh.3-sidux-686'
`/tmp/install-usb-iso.BguL2B/boot/vmlinuz-2.6.30-1.slh.3-sidux-686' -> `/tmp/install-usb.OXX70c/boot/vmlinuz-2.6.30-1.slh.3-sidux-686'
`/usr/share/grub/unicode.pf2' -> `/tmp/install-usb.OXX70c/boot/graphics/unicode.pf2'
`/tmp/install-usb-iso.BguL2B/boot/memtest86+.bin' -> `/tmp/install-usb.OXX70c/boot/memtest86+.bin'
O: files copied to /tmp/install-usb.OXX70c
O: copying files the iso to the /tmp/install-usb.OXX70c
`/home/gordy/sidux.iso' -> `/tmp/install-usb.OXX70c/sidux.iso'
O: iso successfully copied to /tmp/install-usb.OXX70c
O: Initializing persistent overlay
O: persistency overlay prepared
O: creating /tmp/install-usb.OXX70c/boot/grub/grub.cfg
O: umounting /dev/sdb1 from /tmp/install-usb.OXX70c
O: mount point destroyed: /tmp/install-usb.OXX70c


Please be patient as this will take a few minutes and you need to verify the last line....mount point destroyed before attempting to mount usb stick to check it.

Note that I use and recommend -n meaning no format...so command uses first partition...that must be already formatted. But this does give you IMHO better control.
Note that the gui way appears to differ from the command mode way...so I prefer command mode.

Stage 3
Mount stick or external device to check you have at least the following files

ls /media/disk-1
boot  lost+found  sidux.iso


You can also check what grub2 menu maybe? Placed in a code box to highlight it

search --no-floppy --fs-uuid --set 5b71c882-a13c-4a93-a8eb-ab43c7693c1b

insmod video
insmod font
insmod vbe
insmod png
insmod gfxterm

set gfxmode="1024x768x32;800x600x32;640x480x32;1024x768;800x600;640x480"

loadfont /boot/graphics/unicode.pf2

terminal_output gfxterm
set gfxpayload=1024x768x32

if  background_image /boot/graphics/1024x768.png ; then
   set color_normal=white/black
   set color_highlight=magenta/black
else
   set color_normal=green/black
   set color_highlight=cyan/black
fi

menuentry "sidux from iso (2.6.30-1.slh.3-sidux-686)" {
  loopback loop /sidux.iso
  linux (loop)/boot/vmlinuz-2.6.30-1.slh.3-sidux-686 boot=fll fromhd=UUID=5b71c882-a13c-4a93-a8eb-ab43c7693c1b fromiso=/sidux.iso nointro quiet persist lang=au
  initrd (loop)/boot/initrd.img-2.6.30-1.slh.3-sidux-686
}
 
menuentry  "Memory Test (memtest86+)" {
	linux16 /boot/memtest86+.bin
}

menuentry  "Memory Test (memtest86+, serial console 1152000)" {
	linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}


Stage 4

As I used root powers to create the usb partitions, I then had to chown for my data partition.

What yours is called may vary....my first one is /media/disk-1 and second one is ~/disk

sux
chown gordy /media/disk


Copy a file onto the second partition to test it acts like a normal storage device.

Test


Now reboot to test. Open a file manager and also see if you can read/execute/play whatever the file was that you put on the second partition.

If you did not pre-build a cheatcode ...at menu stage you can edit to include toram or other cheatcodes.

Errors


Not knowing how to get into your bios and how to configure your bios could be critical to your testing.

As mentioned, size of usb device affects your ability to install isofile or use persistance.

Attempting to load an isofile that is bigger than your RAM is probably not going to work. I tested XFCE into 2 G of RAM and its ok.

If script fails...you will get some kind of error. Consider going to irc and reporting what that error is. x-un-i has been most helpful to me. But I hope he is
not swamped with chat on this matter.

Therefore, consider using a different partition tool to format and size your partitions. Did you use root powers?
Keep stick unmounted in using partition tool.

Do not attempt to modify any file on usb device until you have confirmed it boots normally.

Other than the 2 folders and file that must be on the device....grub2 must be in mbr of device.
(This is a grub2 wiki if you have come here by mistake)

Back to grub2 home page