Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Grub heartbreaker
Date: Thu, 24 Apr 2008 19:22:12
Message-Id: 200804242121.58121.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] Grub heartbreaker by reader@newsguy.com
1 On Thursday 24 April 2008, reader@×××××××.com wrote:
2
3 > So assuming I've made some mistake in grub.conf I try to boot from
4 > grub command line.
5 >
6 > root = (hd0,0) (which is /dev/sda1 in linux terms)
7 >
8 > kernel /kernel-2.6.25-r1
9
10 Nope. Kernel needs a root=<device> parameter. It can't know what is your
11 root partition, that info is in fstab and fstab is on the root
12 partition.So you tell it via a parameter
13
14 > boot
15 >
16 > But it fails with a message saying please append a working root=?? to
17 > the boot commands.
18
19 expected result. see above.
20
21
22 > So reloading the install ISO I mount /mnt/gentoo/boot and edit
23 > grub.conf to say:
24 >
25 > title=kernel-2.6.25-r1
26 > root (hd0,0)
27 > kernel /kernel-2.6.25-r1 root=/dev/sda3
28 >
29 > That fails
30 > kernel /kernel-2.6.25-r1 root=/dev/hda3 (Thinking maybe grub
31 > does not understand sda)
32
33 Nothing to do with grub. It's a kernel boot parameter passed verbatim to
34 the kernel and needs valid kernel device names.
35
36 What's the error you get? Is (hd0,0) a separate /boot? Does it contain a
37 file called kernel-2.6.25-r1 at the top level? And you also should have
38 a "ro" kernel parameter in there
39
40 > That Fails
41 >
42 > kernel /kernel-2.6.25-r1 root=(hd0)/sda3
43 >
44 > Fails
45
46 Won't work. (hd0) is a grub thing. You need a /dev/sda3 or similar in
47 there
48
49 > I've even tried:
50 > kernel /kernel-2.6.25-r1 root=(hd0,2)
51
52 Won't work. Same reason.
53
54 > And another failure... all with the same message about appending a
55 > working `root=???'
56 >
57 > I'm about out of ideas here.
58
59 here's a working grub.conf for illustration:
60
61 default 0
62 timeout 10
63 splashimage=(hd0,0)/grub/splash.xpm.gz
64
65 title Default
66 root (hd0,0)
67 kernel /vmlinuz root=/dev/sda3 ro
68
69 title Gentoo-2.6.25
70 root (hd0,0)
71 kernel /vmlinuz-2.6.25-gentoo root=/dev/sda3 ro
72
73 Seems my setup is identical to yours:
74 /boot on /dev/sda1 aka (hd0,0) to grub
75 / on /dev/sda3
76
77 Only difference is the "ro" boot parameter, which shouldn't make a
78 difference - it's there for fsck purposes during start-up.
79
80 What disk driver and disks do you have? Are you 100% sure you are either
81 using the new ata driver (everything is an sd) or have scsi/sata disks?
82 If your disk is IDE with the old driver, it will be an hd and will
83 require that on the kernel line
84
85 --
86 Alan McKinnon
87 alan dot mckinnon at gmail dot com
88
89 --
90 gentoo-user@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Grub heartbreaker John covici <covici@××××××××××.com>
[gentoo-user] Re: Grub heartbreaker reader@×××××××.com