LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   edit lilo.conf to enable distro (sugar on a stick) to boot from usb (https://www.linuxquestions.org/questions/slackware-14/edit-lilo-conf-to-enable-distro-sugar-on-a-stick-to-boot-from-usb-895927/)

captain_sensible 08-06-2011 11:17 AM

edit lilo.conf to enable distro (sugar on a stick) to boot from usb
 
Hi

I want to be able to edit lilo.conf so I can boot up a distro which is on a USB stick.

The distro is “sugar on a stick” basically fedora with specialized gui. One application is handy in learning languages, you can type written German, French etc from a foreign dictionary and the app will pretty accurately give audio output for the text. I know its since my French is not bad!


The USB stick boots fine on windows and also used to work on a previous pc that had grub. Lilo seems to be a different kettle of fish but have managed it to boot slackware and salixos.

Basically copied same code used to boot distros which are on hard drive- the usb starts to boot
then gives various output amongst which kernel panic.

nittygritty of currrent lilo.conf is

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda2
label = Linux
read-only
image = /boot/vmlinuz
root = /dev/sda3
label = slackware
read-only

#usb
image = /boot/vmlinuz
root = /dev/sdb
append="rootdelay=10 vt.default_utf8=0"
label = USB
read-only

# Linux bootable partition config ends

using fdisk -l the usb stick comes up as /dev/sdb

on the stick vmlinuz0 is in /EFI/boot and in /syslinux

any ideas?

psionl0 08-07-2011 03:20 AM

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda2
label = Linux
read-only
<-------------------------- I imagine this section of the code below never gets read
image = /boot/vmlinuz
root = /dev/sda3
label = slackware
read-only

#usb
image = /boot/vmlinuz (you are booting off slackware's kernel - not "sugar on a stick"'s)
root = /dev/sdb (It is more likely /dev/sdb1)
append="rootdelay=10 vt.default_utf8=0"
label = USB

If you run fdisk /dev/sdb and do the p command you will get a list of the partitions on the device.

Assuming that you mount /dev/sdb1 to /mnt before running lilo, this is how I would do it:
Code:

#usb
image = /mnt/boot/vmlinuz
root = /dev/sdb1
append="rootdelay=10 vt.default_utf8=0"
label = USB
read-only

(check the name of "sugar on a stick"'s kernel).

captain_sensible 08-07-2011 06:55 AM

hi

psionl0

I installed salixos first and lilo install came up and chose MBR , so in salixos I have /etc/lilo.conf

Then I installed slackware, and when it came to lilo install ignored it,and quit, then booted up salixos and added entry for slackware.in slackware there is no /etc/lilo.conf

By default pc boots to salixos ,but at the boot splash I can arrow down and choose slackware.Both these os's working fine. maybe this isn't the most elegant way ,but it works and was too frightened to touch it in case of failure to be honest. Should I have maybe let slackware install lilo to the MBR and then have added the salixos entry ?

have booted into salixos :
now then on the usb :
root[andrew]# fdisk /dev/sdb1 parted -l

Disk /dev/sdb1: 2004 MB, 2004860928 bytes
62 heads, 62 sectors/track, 1018 cylinders, total 3915744 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 ? 3179282432 3187605521 4161545 a OS/2 Boot Manager

Partition table entries are not in disk order
root[andrew]#

fdisk -l tells me its fat16, which I don't understand since its fedora linux

on mounting

root[andrew]# mount -t vfat /dev/sdb1 /mnt/sugar

mounts the usb, but i'm in salixos operating system system, so when I reboot i won't be in any os at that stage will I ? or can I permantly mount the usb ?


but I can see what your saying ,the entry "image" for the usb in lilo.conf must map to a kernel image in the usb stick. what i beleive the kernel image to be is vmlinuz0 in /syslinux

theres also osmin.img in /mnt/sugar/LiveOS (after mounting /dev/sdb1)

psionl0 08-09-2011 12:30 AM

Quote:

Originally Posted by captain_sensible (Post 4435877)
now then on the usb :
root[andrew]# fdisk /dev/sdb1 parted -l

Two different disk partitioning utilities in the same line sounds like a recipe for conflict to me (yes, I know that parted is only being used to display the partition info).

You appear to be mixed up between drives and partitions. /dev/sdb is the driver for the memory stick (drive) while /dev/sdb1, /dev/sdb2 etc are the partitions on that drive. To "fdisk" the memory stick, use fdisk /dev/sdb. To mount a partition use mount /dev/sdb1 /mnt.

You would need to examine the files on the memory stick to see what the "vmlinuz" file is on the stick and also if an "initrd" is used.

Of course, you might just be doing all this the hard way. If "sugar on a stick" is a live distro then it is possible that your memory stick has been formatted in such a way that it is bootable. Set up your PC so that it boots off a memory stick first (if one is present). Then you can boot "sugar on a stick" just by putting the stick in the PC and not change any of your PC configurations.

captain_sensible 08-21-2011 07:13 AM

cheers

I agree probably going about it hard way, the bios on this unit must be old I can't see any options to enable boot from usb,although previously managed to do on previous computers.

Played around with the usb and couldn’t get to work, so eventually tried it on a windows machine, it wouldn't work on that either so there's a problem with the software!

putting sugar on a stick to the back boiler; one thing I would like to clarify though is my code for lilo.conf for dual booting of salixos or Slackware, your indicating the code code be improved? How would you have written it?


All times are GMT -5. The time now is 10:39 PM.