You are not logged in.

#1 2009-11-25 02:53:44

xeddog
Member
Registered: 2009-11-25
Posts: 9

Can't get Arch into Grub2 menu

Hi all,  newbie here.

I have a machine has a Ubuntu Jaunty install on the first disk (sda) that is stable and used every day (almost).  I had Karmic installed on the second disk (sdb), but decided to wipe it out and install Arch there.  The Arch install itself seems to have gone ok so far, but when I had to reboot I could not get Grub2 to run anymore.  After the Grub Loading message. it gave me "error: no such disk", and then just dropped to the grub rescue prompt.  At that prompt, I could not find any command that would run.  Everything I tried said command not found.  Even --help, -h, help, and several other commands that I tried to get help, and I tried things like update-grub and a few other grub2 commands.  Everything said command not found.

Moving on, I found a thread to get my grub 2 menu back so I could boot the Jaunty install.  Big WHEW! there.  Then I started trying to get Arch on the menu.  The first thing I tried (from Jaunty) was "sudo update-grub2".  The command ran normally and even told me that it  found Arch on sdb3 (which is correct), but when I rebooted, Arch was nowhere to be seen on the grub2 menu.  The next thing I tried was manually adding Arch to the /boot/grub/grub.cfg file.  Problem there is that I could not save any changes I put in there.  The file was read-only, even to root.  Then I tried adding the menuentry information to /etc/grub.d/40_custom.  I saved that one, but when I rebooted Arch was still not on the menu.

I'm out of ideas so if anyone can help I would really appreciate it.

Thanks in advance,

xeddog

btw,  the info I was adding is :

menuentry "Arch" {
       set root=(hd2,3)   (note:  Also tried hd1,3)
    linux /vmlinuz26 root=/dev/sdb3 ro quiet splash
    initrd /kernel26.img
}

Offline

#2 2009-11-25 05:26:18

qb1base
Member
Registered: 2009-07-30
Posts: 15

Re: Can't get Arch into Grub2 menu

/etc/grub.d/40_custom has to be made executable before running update-grub to put the entry into /boot/grub/grub.cfg. Are you sure your rule is correct?
Here's mine for comparison:
menuentry "Arch Linux (on /dev/sda7)" {
    insmod ext2
    set root=(hd0,7)
    search --no-floppy --fs-uuid --set 214d868e-08ea-4019-9f46-4233ef5775b4
    linux /boot/vmlinuz26 root=/dev/disk/by-uuid/214d868e-08ea-4019-9f46-4233ef5775b4 ro
    initrd /boot/kernel26.img
}

Offline

#3 2009-11-25 16:01:24

xeddog
Member
Registered: 2009-11-25
Posts: 9

Re: Can't get Arch into Grub2 menu

I checked the permission of the /etc/grub.d/40_Custom file and it is executable.  I also checked all of the permissions against another system running grub2 and they all look the same.  One question I have is why does the update-grub2 command recognize that Arch is installed on sdb3 but is not able to add it to the grub menu???

Thanks,

xeddog

Offline

#4 2009-11-25 17:43:14

qb1base
Member
Registered: 2009-07-30
Posts: 15

Re: Can't get Arch into Grub2 menu

I think the os_prober is a bit buggy, try disablely it in /etc/default/grub by adding:GRUB_DISABLE_OS_PROBER=true, then run update-grub again.

Offline

#5 2009-11-25 22:17:34

xeddog
Member
Registered: 2009-11-25
Posts: 9

Re: Can't get Arch into Grub2 menu

Well, I am making SOME progess.  It might be "progress to the rear" but what the heck. 

After having to re-install grub2 a couple more times I finally got Arch in the grub2 menu.  I made some adjustments to the /etc/grub.d/40_custom file, reran update-grub, and it put the new modifications into /boot/grub/grub.cfg.  So that works now.

I have tried several things in the /etc/grub.d/40_custom.  Here is one:

menuentry "Arch Linux (hd2,1)"  {
    insmod ext2
    set root=(hd2,1)
    search --no-floppy --fs-uuid --set 97ba78bc-319c-4562-ac9a-3cca594a7420
    linux /vmlinuz26 root=/dev/disk/by-uuid/97ba78bc-319c-4562-ac9a-3cca594a7420  ro 
    initrd /kernel26.img
}

I got the uuids from the results.txt file created by boot_info-script036.sh.  As for the set root= I have tried a number of things.  If I understand the numbering system, /dev/sdb3 should translate into (hd2,3) for grub 2.  Is that right or did I get it bass ackwards?   Using the example above I can finally boot Arch, or at least START to boot Arch.  Soon after the boot starts I get a kernel panic.  *^%#$@#

And just for clarity, this is the output of my fdisk-l command plus some comments added.

 
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa4f51b05

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       38539   309564486   83  Linux
/dev/sda2           38540       38913     3004155    5  Extended
/dev/sda5           38540       38913     3004123+  82  Linux swap / Solaris

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf8283fe9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104422   83  Linux   <--  This is the /boot partition
/dev/sdb2              14          46      265072+  82  Linux swap / Solaris  <-- Swap of course
/dev/sdb3              47        1003     7687102+  83  Linux   <-- / partition
/dev/sdb4            1004       24321   187301835   83  Linux  <-- and /home

Based on this information I assume that I am supposed to boot from the /boot partition which is /sdb1 and that would equal (hd2,1) in grub2.  If I try to use (hd2,3)  which is the / partition, and use /boot/vmlinuz26... and /boot/kernel26.img all I get is a grub error that I need to load the kernel first.

anybody??  anybody??

xeddog

Offline

#6 2009-11-25 22:35:40

qb1base
Member
Registered: 2009-07-30
Posts: 15

Re: Can't get Arch into Grub2 menu

Should be (hd1,1) or (hd1,3) depending on where your kernel is.

Offline

#7 2009-11-25 22:40:39

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can't get Arch into Grub2 menu

I have a similar setup to yours (except I am booting to a third hard drive - sdc1) and my set root is (hd2,0) and it works a charm...

From the Ubuntu help page:

Any partition designation (sda4, sdb6) must be changed, as GRUB and GRUB 2 count the partitions differently. The first partition for GRUB 2 is 1, not 0. Devices still start the count at 0.

The way I read your fdisk, if you want Arch as sdb, you would want to set root as (hd1,1).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2009-11-26 01:01:50

xeddog
Member
Registered: 2009-11-25
Posts: 9

Re: Can't get Arch into Grub2 menu

OK.  I am using (hd1,1) and it is starting to boot Arch, but now I am stuck at the kernel panic.  As near as I can tell, the boot starts out fine, but there are so many lines being displayed that  I just cannot see them.  I have tried finding a log to look through, but I guess I don't know where to look.  I have copied down the last few lines of the display.

I **think** all is good until:

.
.
.
::Initramfs Completed -  control passing to kinit
IP-Config: - No devices to configure
Waiting 0 s before mounting root device...
kinit:  Mounted root (ext2 filesystem) readonly.
kinit:  init not found!
Kernel Panic - not syncing:Attempting to kill init!
Pid: 1, comm: kinit not tainted 2.6.31-ARCH #1
Call Trace:

then a few lines of the trace info.  As I mentioned, this is copied by hand so I might be off on the capitalization but the text is all correct.   

I ain't gotta clue what this means so any help is appreciated.

Thanks,

xeddog

btw - using (hd1,0), (hd1,1), and (hd2,1) in the grub2 menu item all yield the exact same results

Last edited by xeddog (2009-11-26 01:09:09)

Offline

Board footer

Powered by FluxBB