LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   grub boot xandros (https://www.linuxquestions.org/questions/linux-general-1/grub-boot-xandros-296053/)

bogus__13 02-28-2005 07:26 PM

grub boot xandros
 
I'm trying to get xandros 3 to boot from my fedora grub menu and keep getting an error. I would really appreciate it if someone has some good advice on this.
I do have xandros loaded on /dev/hda1 and it did boot with the xandros lilo boot loader. I want to boot from the FC3 grub menu instead of lilo.

When xandros is selected from the grub menu, I get these errors
Code:

VFS: Cannot open root device "hda1" or unkown-block (0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (0,0)

Here is the output of fdisk -l
Code:

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        1275    10241406  83  Linux
/dev/hda2            1276        6374    40957717+  83  Linux
/dev/hda3            6375        6450      610470  82  Linux swap

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
16 heads, 63 sectors/track, 77545 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hdb1  *          1      38753    19531480+  c  W95 FAT32 (LBA)
/dev/hdb2          38754      77545    19551168    c  W95 FAT32 (LBA)

Here is the Fedora grub.conf
Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,1)
#          kernel /boot/vmlinuz-version ro root=/dev/hda2
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Fedora Core (766_FC3)
        root (hd0,1)
        kernel /boot/vmlinuz-2.6.10-1.766_FC3 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.10-1.766_FC3.img       
title Xandros
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-x1 root=/dev/hda1 rw acpi=on
        initrd /boot/initrd-2.6.9-x1.gz


homey 02-28-2005 10:44 PM

Got it!
I googled around abit and didn't see any solutions so I decided to load xandros up and give it a try.
On my system, I put xandros on /dev/hda2 .
Sure enough, it popped that error every time with the grub boot. I even used the debian sources to install grub while in xandros and it still came up with an error saying that the "root=" part was incorrect.
While putzing around in Fedora, I decided to mount the xandros partition and chroot into it ....
mkdir /mnt/test
mount /dev/hda2 /mnt/test
chroot /mnt/test

Then I decided to see what it thought the root partition should be called, so I ran the command:
rdev
Instead of the expected /dev/hda2 / I got this... 0x0302 so in a moment of inspiration I put that entry into the grub.conf
Code:

title Xandros
        root (hd0,1)
        kernel /boot/vmlinuz-2.6.9-x1 root=0x0302 rw acpi=on
        initrd /boot/initrd-2.6.9-x1.gz

And it worked!!! Booted right into xandros, lots of commands scrolling by which were hidden by the xandros boot screen when it was using lilo. :)

On your system, that should be a different number as you're using /dev/hda1 . Try it and see.

bogus__13 03-04-2005 09:00 AM

I tried it the way you said homey, but I ran into a problem.

Code:

Booting 'Xandros'
root (hd0,1)
Filesystem type is ext2fs, partition type 0x83
kernel /boot/vmlinuz-2.6.9-x1 root=0x0302 rw acpi=on

Error 15: File not found

press any key to continue.....

When you press any key it takes you back to the grub menu.
Any ideas what might happened?:confused:

homey 03-04-2005 09:33 AM

Quote:

/dev/hda1 * 1 1275 10241406 83 Linux
That means your xandros is on root (hd0,0) in grub speak.

So, your grub.conf probably should look like this ...
Code:

title Xandros
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-x1 root=0x0301 rw acpi=on
initrd /boot/initrd-2.6.9-x1.gz


bogus__13 03-04-2005 11:07 AM

First I would like to apologize to you homey. I miss typed a couple of numbers in my grub config..;)
After I fixed the numbers, everything works very well. Thank-You for your help.:D

homey 03-04-2005 11:12 AM

Glad ya got it going. :)
I see that I made a bunch of errors on the last post.
It should look like this....
title Xandros
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-x1 root=0x0301 rw acpi=on
initrd /boot/initrd-2.6.9-x1.gz

bogus__13 03-04-2005 11:26 AM

Would like to give homey 2 thumbs up.:cool:
Here is what my grub config. looks like now.
Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,1)
#          kernel /boot/vmlinuz-version ro root=/dev/hda2
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Fedora Core (2.6.10-1.770_FC3)
        root (hd0,1)
        kernel /boot/vmlinuz-2.6.10-1.766_FC3 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.10-1.766_FC3.img       
title Xandros
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.9-x1 root=0x0301 rw acpi=on
    initrd /boot/initrd-2.6.9-x1.gz

I had entered the wrong partion number for Xandros.

Hackeron 03-15-2005 06:43 PM

Xandros does seem a little crippled there :rolleyes: - Thanks for the tip though, I'm finally able to use grub with xandros.

bogus__13 03-21-2005 07:54 PM

:D Thats a sweet deal Hackeron!

clacour 03-24-2005 05:28 PM

Thanks to everybody who posted info on this topic - I just installed Xandros 3 in a multiboot environment and was running into the same problem. The info here helped me get it sorted out fairly quickly.

I did run into one problem, though, and thought I'd pass along what I found out.

When I ran rdev against the Xandros kernel, it said "0x0108". That didn't work. (By the way, homey, thanks for the suggestion of rdev - it had literally been years since I've used that, and I might never have thought of it!)

Going through the man page, that number is the major number and minor number of the device file (/dev/hda9, for example).

So I figured since my Xandros partition was hda9, the parameter I passed the kernel should be 0x0309. That worked.

For the benefit of anyone else trying to do this, here are the major and minor numbers for common disk types (in hex):

IDE and SATA drives:
hda 3,0 (Add one for each partition - hda1 is 3,1 (0x0301), hda9 is 3,9 (0X0309))
hdb 3,40 (Again, add one. hdb1 is 41, hdb9 would be 3,49. Remember to add in hex!)
hdc 16,0 (0x16 is 22 decimal, which is how you'll see it in /dev)
hdd 16,40
hde 21,0
hdf 21,40
hdg 34,0
hdh 34,40

SCSI drives:
sda 8,0
sdb 8,10 (note that you can only have 15 partitions max on SCSI! Minor tidbit I hadn't known. Also, that 10 is 16 in decimal, just as a reminder)
sdc 8,20 (0x20 = 32 decimal)
sdd 8,30
...
sdp 8,F0
sdq 41,0 (41 hex = 65 decimal)
sdr 41,10
and so on...


Also, for the case of Xandros specifically, since it also writes the boot block to it's own partition (hda9 in my case), you can also use in grub:

Title Xandros (via chainloader)
root(hd0,8)
chainloader +1

That might not work for all distributions, but it should for Xandros.

homey 03-24-2005 08:49 PM

Thanks clacour,

I don't have xandros handy right now but I wonder if you could also use rootnoverify like this....

Title Xandros (via chainloader)
rootnoverify(hd0,8)
chainloader +1

Hackeron 03-25-2005 11:08 AM

Xandros criticism
 
Hmm, I keep liking Xandros less and less. Other than MPEG4 codecs, it does seem like quite a poor distribution: ftp://81.86.159.146/xandros-criticism

homey 03-25-2005 11:40 AM

IMHO, it looks like that person has an axe to grind.

Xandros is Debian with a modified user interface. It has nice hardware detection and you can use the debian repositories which gives you about 15000 softwares available. It is automatically ready to network with any Windows boxes on the local network. It automatically allows you to access the ntfs partitions.

I make a habit of trying out almost all distros which show up on distrowatch and seriously, most distros are very similar. All of the hype about this one being better than or worse than other distros is garbage. They are all very much alike and the biggest difference is the user interface.

And yes, I like Xandros because it is very newbie friendly

In fact, I have a collection of distro cdroms which I have loaded up over the years ( about 200 ) and haven't found one yet that is radically better or worse than the others.


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