LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Xandros Broke My Boot! (https://www.linuxquestions.org/questions/linux-distributions-5/xandros-broke-my-boot-38126/)

deesto 12-12-2002 10:42 AM

Xandros Broke My Boot!
 
I had configured (with much blood, sweat, and tears) a multi-boot system, with WinXP Pro, Mandrake 9, and Slackware 8.1, on the same IDE0 drive on different partitions using LILO. I then created an extended partition, so I could add another partition and install another Linux distro. I chose Xandros, and it installed without incident and runs perfectly, as does WinXP. It also imported the other OSes, although incorrectly, it seems, and incorporated them into the "Xandros" boot menu. However, selecting any OS other than Xandros or XP from this menu results in a boot error:
Loading kernel
Unexpected EOF

Apparently, Xandros uses some flavor of LILO in their menu, but it seems to use some sort of custom label names for all OSes. Obviously, I could just go ahead and change the label names to those originally assigned, but I wonder:[list=1][*]Has anyone ever tried this with Xandros and dual/multi-boot?[*]What exactly does Xandros do to create its menu, and is it purely a LILO adaptation?[*]Is this an error that simply correcting label names will fix?[*]Is this gonna blow up my machine for good?[*]I've done some research on LILO, but does anyone know of a good LILO guide or a template I can use to overhaul my boot options?[/list=1]
As always, thanks very much for your help.

Thymox 12-12-2002 10:56 AM

1. No
2. It is more than likely either a Lilo or Grub configuration
3. No
4. No
5. There should be a good howto at TLDP (see my sig).

Ok, now that I have the minimalistic answers out of the way, I can tell you why I think it's not working...

With both Lilo and Grub, to boot Windows all you need to do is point it at the correct partition. With other Linux distros, however, you will need to copy their kernel file (and possibly their initrd file) over to your Xandros boot partition and edit the boot config file.

This is not as hard as it seems. If you boot to Xandros and list your partitions (fdisk -l /dev/hda) then you can see which are your Linux partitions. You should mount the one with the distro in question... if, for example, you had this:
Code:

/dev/hda1 = Windows XP
/dev/hda2 = Mandrake 9.0
/dev/hda3 = Slackware 8.1
/dev/hda4 = Extended
/dev/hda5 = Xandros

, then you would want to mount /dev/hda2 so that you can access your Mandy files. You would then copy the Mandrake kernel (and initrd file) over to your Xandros /boot directory, and edit your lilo.conf/grub.conf file to reflect the changes. You should not change the 'root=/dev/hdaX' line.

HTH

deesto 12-12-2002 11:38 AM

Thank you Thymox; great help!
I didn't think to check for GRUB files while I was still home (at work now), but the clues do indeed indicate the loader is LILO-based. There are two LILO files in /etc very similar in name and size: lilo.conf and lilob.conf. I noticed two things in lilo.conf:[list=1][*]The third line of the file reads: "message=/boot/splash.lilo", which tells me where Xandros's boot loader background is kept, and[*]The label for the partition on which Slackware exists (/dev/hda5) reads: "label=Welcome_to_", and the image line reads: "image=/disks/welcome/dev/hda1". This hardly seems like a normal Linux image/path.[/list=1]
BTW, what window manager do you use? ;)

Thymox 12-12-2002 11:43 AM

Hehe! No, it doesn't!
Setting up this to quadboot should be no more difficult than any other, now that we know which bootloader it uses. Basically, lilo needs to be able to read the kernels when it's being installed and when its being run. In order to do this, the easist way is to simply have all the necessary files in one place!

And as for the Window Manager... I'll let you guess :D I was getting sick of every other thread being 'Which window manager is best... which do you use and why... I use XXX and it's slow, what do you use...' you get the idea. So, I put it in my sig. Glad to see someone reads these things!

Edward78 12-12-2002 12:38 PM

Ya just point lilo/grub to the right partitions.

deesto 12-12-2002 12:45 PM

OK, the more I look at the LILO config file Xandros has created, the more confused I'm getting; lots of stuff I've never seen before... I can't cut&paste it from work, but I did print it out, so I'll have to retype it... check out some of these lines like install= and map=, and the wacky label names Xandros comes up with! The file has no comments, so I'll add some below:
Quote:

boot=/dev/hda
install=/boot/cboot.b
message=/boot/splash.lilo
timeout=300
map=/boot/map
prompt
fix-table
lba32
read-only
disk=/dev/hda bios=0x80
# disk HDA (IDE0) houses all OSes, including XP, Mandy, Slack, and Xandros, on separate partitions
# disk HDB (IDE1) is currently an NTFS data partition in XP
disk=/dev/hdb bios=0x81
#Xandros image
image=/vmlinuz
label=[]s_Desktop_1.0
vga=0xf04
root=/dev/hda6
initrd=/boot/initrd-2.4.19-xl.gz
append="rw acpi=off "
#Xandros 'safe mode'
image=/vmlinuz
label=Safe_Video_Mode
vga=0xf04
root=/dev/hda6
initrd=/boot/initrd-2.4.19-xl.gz
append="rw 3 acpi=off "
#Xandros 'expert'
image=/vmlinuz
label={}ure_(Expert)
vga=normal
root=/dev/hda6
initrd=/boot/initrd-2.4.19-xl.gz
append="rw single acpi=off "
#WinXP; check out the funky label! must use entities
other=/dev/hda1
label=W<>®_XP
#Slackware 8.1; again, funky label and image
image=/disks/welcome/dev/hda1
label=Welcome_to_
root=/dev/hda5
#Mandrake 9; funky image
image=/disks/mandrake/dev/hda1
label=Mandrake_Linux
root=/dev/hda2
I noticed that in the previous, working lilo.conf, both Mandy's and Slack's image= lines pointed to /boot/vmlinuz. That's not the case here. From where does LILO get its labels and image paths?

Thymox 12-12-2002 12:46 PM

Quote:

Ya just point lilo/grub to the right partitions.
No... that works for Windows. You can have it work for other Linux distros too, but it requires that you install Lilo onto the boot partition of each Linux distro, rather than having just one copy in the mbr.

Thymox 12-12-2002 12:57 PM

I'm not too sure about the Xandros boot menu options, but try this for the others:
Code:

boot=/dev/hda
install=/boot/cboot.b
message=/boot/splash.lilo
timeout=300
map=/boot/map
prompt
fix-table
lba32
read-only
disk=/dev/hda bios=0x80
# disk HDA (IDE0) houses all OSes, including XP, Mandy, Slack, and Xandros, on separate partitions
# disk HDB (IDE1) is currently an NTFS data partition in XP
disk=/dev/hdb bios=0x81
#Xandros image
image=/vmlinuz
    label=Xandros_Desktop
    vga=0xf04
    root=/dev/hda6
    initrd=/boot/initrd-2.4.19-xl.gz
    append="rw acpi=off "
#Xandros 'safe mode'
image=/vmlinuz
    label=Safe_Video_Mode
    vga=0xf04
    root=/dev/hda6
    initrd=/boot/initrd-2.4.19-xl.gz
    append="rw 3 acpi=off "
#Xandros 'expert'
image=/vmlinuz
    label=Xandros_Expert
    vga=normal
    root=/dev/hda6
    initrd=/boot/initrd-2.4.19-xl.gz
    append="rw single acpi=off "
#WinXP; check out the funky label! must use entities
other=/dev/hda1
    label=WinXP
#Slackware 8.1; again, funky label and image
image=/otherlinux/slack81
    label=Slackware
    root=/dev/hda5
#Mandrake 9; funky image
image=/otherlinux/mandy9
    label=Mandy
    root=/dev/hda2
    initrd=/otherlinux/mandyinit.gz

You will also need to do this:
Code:

su root
(enter roots password)
mkdir /mnt/mandy
mkdir /mnt/slackware
mkdir /otherlinux
mount /dev/hda2 /mnt/mandy
mount /dev/hda5 /mnt/slackware
cp /mnt/mandy/vmlinuz /otherlinux/mandy9
cp /mnt/mandy/boot/initrd.gz /otherlinux/mandyinit.gz
cp /mnt/slackware/vmlinuz /otherlinux/slack81
emacs /etc/lilo.conf (change to above, or something near what is above)
/sbin/lilo
exit

As you can see, what is being done is that you're copying the Mandy and Slackware kernel image files (and the Mandy initrd file) over to your current Xandros partition. You are then editing your lilo.conf file and giving it the correct options. You then re-run lilo so that the changes that have been made are put into place... if you get any errors, this is where you will probably get them, if so, post them here! Hopefully that should do, and you will be able to reboot and have a nice menu with all 4 OSs!

Hope this helps and good luck!

deesto 12-12-2002 01:17 PM

Thymox, this is a thing of beauty... you've even spelled out my copy and mount commands for me... for what more could I ask? ;)
I will try them later from home and post the results.
I do recall that, when I had LILO working previously, it didn't always present the boot menu... it just showed the LILO version line, then booted straight to the default OS without showing the menu, unless a certain key combination was pressed, a combination of which I'm not sure because it didn't always seem to be the same (unless I'm just that bad of a typist). Is this normal? I see a "timeout" value in these conf files, but nothing to denote how to activate the menu itself... Is this always <TAB> or is this configurable somehow?

Thymox 12-12-2002 01:23 PM

Lifted straight from the command man lilo.conf:
Code:

      prompt Automatic booting (see `delay' above) will not take place unless
              a  locked  or  pre-stored  ("lilo  -R") command line is present.
              Instead, the boot loader will issue the boot:  prompt  and  wait
              for  user  input  before  proceeding (see timeout below).  Unat-
              tended default image reboots are impossible if `prompt'  is  set
              and `timeout' is not, or the default image is password protected
              at a higher level than `restricted'.

With prompt and timeout, you are given a set amount of time to make a selection, after which the default is booted. If you change from the defaule (ie you move up or down the menu), the timer is cancelled.

deesto 12-12-2002 03:11 PM

I thought I'd better post some more information that I've found while doing some more research (since I'm still at work and can't yet tinker with my system at home!). Some miscellany that I've found, and unfortunately, not all in one place:
  • LILO supports the loading of up to 16 images
  • During LILO boot, pressing the TAB key lists a menu of possible images to load; the SHIFT key displays a prompt.
  • Running the command /sbin/lilo applies any changes to the .conf file. This should be done with any change to the file, new OS or kernel installation, etc.
  • Running /sbin/lilo outputs a list of images added according to the configuration file, adding an asterisk (*) to denote the default image.
  • Ways to change the default image loaded by LILO include moving the "image" line, and related lines in that section, in the lilo.conf file, so that it becomes the first "image" section on the list (or "other" section, if it's non-Linux); adding a default= line to lilo.conf (e.g., "default=linux"); or running the lilo -D <image> command (e.g., "lilo -D linux").

deesto 12-12-2002 08:02 PM

OK Thymox, I had to make some small changes to adjust to true file names; here's what I did:
Code:

linwinbox:~# mkdir /mnt/mandrake
linwinbox:~# mkdir /mnt/slackware
linwinbox:~# mkdir /otherlinux
linwinbox:~# mount /dev/hda2 /mnt/mandrake/
linwinbox:~# mount /dev/hda5 /mnt/slackware/
linwinbox:~# cp /mnt/mandrake/vmlinuz /otherlinux/mandy9
cp: cannot stat `/mnt/mandrake/vmlinuz': No such file or directory
linwinbox:~# cp /mnt/mandrake/boot/vmlinuz /otherlinux/mandy9
linwinbox:~# cp /mnt/mandrake/boot/initrd /otherlinux/mandyinit.gz
cp: cannot stat `/mnt/mandrake/boot/initrd': No such file or directory
linwinbox:~# cp /mnt/mandrake/boot/initrd.img /otherlinux/mandyinit.gz
linwinbox:~# cp /mnt/slackware/boot/vmlinuz /otherlinux/slack81
#edited /etc/lilo.conf here
linwinbox:~# /sbin/lilo
Added W<>®_XP *
Added []s_Desktop_1.0
Added Slackware81
Added MandrakeLinux9
Added Safe_Video_Mode
Added {}ure_(Expert)

Gonna reboot...cross your fingers :eek:

deesto 12-12-2002 09:13 PM

It worked!!! :D All OSes booted!! Details:
WinXP: booted & shut down perfectly!
Xandros: booted & shut down perfectly!
Mandrake: some errors on boot, froze during shutdown
Slackware: some errors on boot, shut down perfectly

As Mandrake booted, one error I saw was modprobe: can't locate fb0 .
As Mandrake shut down, it spit out some errors:
Unmounting NFS fils system: Cannot MOUNTPROG RPC: RPC: program not registered
Umount2: device or resource busy
Umount: /net device is busy
FAILED
FAILED


As Slackware booted, two errors I saw were:
SIOCSIFNETMASK: no such device
eth0: unknown interface: no such device


The only thing I can think of with the net/eth0 errors is that the machine has an ECS K7S5A motherboard and the ethernet card is built in, but it does have the latest drivers installed and it's not a problem with the other OSes. I don't recall seeing these errors before.
Thanks for your help with LILO! If you've any ideas on the other problems, I'm all ears.

deesto 12-16-2002 02:03 PM

I thought I should add some new info to finish this off. I installed another OS this weekend, and with Thymox's guidance below, it was no problem to add it to LILO!
However, I saw that once I rebooted, LILO was altered without my doing... here's some info I got back directly from Xandros support:
Quote:

Xandros uses the lilo system, the confiuration file is /etc/lilo.conf
any standard lilo configuration will work in here. But there is one caveat, if your editing lilo by hand you should run chmod a-x /sbin/fooze so that the auto-magic lilo scripts arent run.
Long story short: if you're using Xandros and you need to customize LILO, disable /sbin/fooze as a binary... or you'll get "foozed"!


All times are GMT -5. The time now is 01:12 PM.