Please support VectorLinux!

Author Topic: editing lilo to boot from usb  (Read 5942 times)

Daniel

  • Packager
  • Vectorian
  • ****
  • Posts: 704
    • TuxToys - Packages for VectorLinux 6.0
editing lilo to boot from usb
« on: September 05, 2009, 05:30:12 pm »
I have a bootable usb drive and I would like to edit the /etc/lilo.conf file so that I could plug in my usb drive, boot up the computer, and (in addition to being able to boot into my normal VL installation) be able to boot from the usb drive. (I don't have an option in the bios to boot from usb so I would have to do it this way or boot from a cd and tell it where to go from there but I don't have a cd drive in my computer at the moment) I think I have most of the edits figured out but where should I tell lilo to look for the image (vmlinuz) and where root is? I think it would be something like "root = /dev/sda1" or /mnt/sda1 or something like that. Does anyone know what that should be?
The following sentence is true. The previous sentence is false.

VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM

The Headacher

  • Louder than you
  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1553
  • I like the bass to go BOOM!
    • Multimedia on VL (work in progress)
Re: editing lilo to boot from usb
« Reply #1 on: September 08, 2009, 07:35:50 am »
You could try reconfiguring lilo with VASM, with your usb drive attached.

vasm -> super -> filesystem -> LILO

For me, this seemed to detect the usb drive just fine, but I now have to try what happens when I reboot :).
Most music on my soundcloud page was arranged in programs running on VL.

The Headacher

  • Louder than you
  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1553
  • I like the bass to go BOOM!
    • Multimedia on VL (work in progress)
Re: editing lilo to boot from usb
« Reply #2 on: September 08, 2009, 08:26:18 am »
Well, it sort of booted, but I think Slax wanted another boot parameter or something, because it wouldn't boot all the way for me. However, it looks like it should be possible this way. But I'm now going to fix my lilo, because my computer has absolutely no problems booting from USB :D.
Most music on my soundcloud page was arranged in programs running on VL.

Daniel

  • Packager
  • Vectorian
  • ****
  • Posts: 704
    • TuxToys - Packages for VectorLinux 6.0
Re: editing lilo to boot from usb
« Reply #3 on: September 09, 2009, 06:36:11 am »
Thanks!  I may try that.
The following sentence is true. The previous sentence is false.

VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM

Daniel

  • Packager
  • Vectorian
  • ****
  • Posts: 704
    • TuxToys - Packages for VectorLinux 6.0
Re: editing lilo to boot from usb
« Reply #4 on: September 24, 2009, 06:16:49 pm »
Ok, I tried using vliloconf to find the usb stick and it found it when it was asking where to put the mbr but not when it showed the available operating systems to include in the lilo menu. At the top of lilo.conf, there is a line that says: boot = /dev/hda1  (which is where my mbr is located which is correct) I ran liloinst.sh (on the usb stick) to make it bootable. liloinst.sh makes an mbr on the usb drive where it is run. Is there a way to put an entry in lilo that simply redirects (when selected) to the mbr on /dev/sda (my usb stick) ? Another "boot=" line perhaps? I tried putting another stanza in lilo.conf already but it didn't boot when selected and gave me the error: 0x03 (or 0x0E, something like that). Here is the stanza I put in:

# Partition 5: USB
image = /media/disk/boot/vmlinuz
    root = /dev/ram0
    label = USB
    append = "ramdisk_size=6666 changes=slaxchanges"
    read-write
    initrd = /media/disk/boot/initrd.gz


I got the stuff for this from the lilo.conf file which liloinst.sh made and put on the usb stick while making it bootable. Here is the lilo.conf file which was generated by liloinst.sh:

boot=/dev/sda
prompt
timeout=40
lba32
compact
change-rules
reset
install=text
image=/media/disk/boot/vmlinuz
initrd=/media/disk/boot/initrd.gz
label=Slax
root=/dev/ram0
read-write
append = "ramdisk_size=6666 changes=slaxchanges"


(kind of a mess compared to the normal lilo.conf but there it is) I have successfully booted a laptop with this usb stick (after making it bootable with liloinst.sh) so the above lilo.conf definitely works. Can anyone help me with this?
The following sentence is true. The previous sentence is false.

VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM