Gentoo Archives: gentoo-user

From: Alexander Kapshuk <alexander.kapshuk@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] re: can't find /boot/grub/grub.conf after kernel upgrade [3.10.7]
Date: Sat, 07 Sep 2013 19:41:25
Message-Id: 522B8160.4080809@gmail.com
In Reply to: Re: [gentoo-user] re: can't find /boot/grub/grub.conf after kernel upgrade [3.10.7] by "Canek Peláez Valdés"
1 On 09/07/2013 10:35 PM, Canek Peláez Valdés wrote:
2 > On Sat, Sep 7, 2013 at 2:30 PM, Alexander Kapshuk
3 > <alexander.kapshuk@×××××.com> wrote:
4 >> On 09/07/2013 10:25 PM, Canek Peláez Valdés wrote:
5 >>> On Sat, Sep 7, 2013 at 1:53 PM, Alexander Kapshuk
6 >>> <alexander.kapshuk@×××××.com> wrote:
7 >>>> On 09/07/2013 09:35 PM, Canek Peláez Valdés wrote:
8 >>>>> On Sat, Sep 7, 2013 at 1:24 PM, Alexander Kapshuk
9 >>>>> <alexander.kapshuk@×××××.com> wrote:
10 >>>>>> On 09/07/2013 09:11 PM, Canek Peláez Valdés wrote:
11 >>>>>>> On Sat, Sep 7, 2013 at 1:06 PM, Alexander Kapshuk
12 >>>>>>> <alexander.kapshuk@×××××.com> wrote:
13 >>>>>>>> Howdy,
14 >>>>>>>>
15 >>>>>>>> Just compiled the new kernel [3.10.7], was about to edit my
16 >>>>>>>> /boot/grub/grub.conf, and found it missing:
17 >>>>>>>> box0 boot # pwd
18 >>>>>>>> /boot
19 >>>>>>>> box0 boot # ls -a
20 >>>>>>>> . .. kernel-3.10.7-gentoo kernel-3.8.13-gentoo
21 >>>>>>>>
22 >>>>>>>> What did I miss?
23 >>>>>>> Do you have /boot in a separated partition? Did you mounted it?
24 >>>>>>>
25 >>>>>>> Nothing should touch /boot, AFAIK.
26 >>>>>>>
27 >>>>>>> Regards.
28 >>>>>> I do have '/boot' on a separate partition. If I understand it correctly,
29 >>>>>> '/boot' gets mounted every time at system start-up, based on
30 >>>>>> '/etc/fstab', does it not?
31 >>>>> By the contents of your fstab, it should...
32 >>>>>
33 >>>>>> box0 boot # cat /etc/fstab
34 >>>>>> <snip>
35 >>>>>> /dev/sda1 /boot ext2 default,noatime 0 2
36 >>>>>> /dev/sda2 none swap sw 0 0
37 >>>>>> /dev/sda3 / ext4 noatime 0 1
38 >>>>>> /dev/sda5 /home ext4 noatime 0 2
39 >>>>>> /dev/cdrom /mnt/cdrom auto noauto,ro 0 0
40 >>>>>>
41 >>>>>>
42 >>>>>> box0 boot # mount|grep /dev/sda
43 >>>>>> /dev/sda3 on / type ext4 (rw,noatime,data=ordered)
44 >>>>>> /dev/sda5 on /home type ext4 (rw,noatime)
45 >>>>> ,,,however mount says up there that it's not mounted.
46 >>>>>
47 >>>>>> box0 boot # fdisk -l /dev/sda
48 >>>>>>
49 >>>>>> Disk /dev/sda: 250.1 GB, 250059350016 bytes, 488397168 sectors
50 >>>>>> Units = sectors of 1 * 512 = 512 bytes
51 >>>>>> Sector size (logical/physical): 512 bytes / 512 bytes
52 >>>>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
53 >>>>>> Disk identifier: 0x00000000
54 >>>>>>
55 >>>>>> Device Boot Start End Blocks Id System
56 >>>>>> /dev/sda1 * 2048 67583 32768 83 Linux
57 >>>>>> /dev/sda2 67584 1116159 524288 82 Linux swap / Solaris
58 >>>>>> /dev/sda3 1116160 43059199 20971520 83 Linux
59 >>>>>> /dev/sda4 43059200 488397167 222668984 5 Extended
60 >>>>>> /dev/sda5 43061248 488397167 222667960 83 Linux
61 >>>>> For some reason your /boot partition didn't get mounted. See the boot
62 >>>>> logs, and try to mounting by hand. Perhaps the fsck failed or it needs
63 >>>>> manual intervention.
64 >>>>>
65 >>>>> Regards.
66 >>>> Based on the 'dmesg' output below, EXT2-fs attempted to mount the '/'
67 >>>> partition instead of the '/boot' one.
68 >>>>
69 >>>> box0 ~ # dmesg|grep 'EXT.*fs'
70 >>>> [ 2.444214] EXT2-fs (sda3): error: couldn't mount because of
71 >>>> unsupported optional features (240)
72 >>>> [ 2.444736] EXT4-fs (sda3): couldn't mount as ext3 due to feature
73 >>>> incompatibilities
74 >>>> [ 2.481412] EXT4-fs (sda3): mounted filesystem with ordered data
75 >>>> mode. Opts: (null)
76 >>>> [ 9.448819] EXT4-fs (sda3): re-mounted. Opts: (null)
77 >>>> [ 9.731383] EXT4-fs (sda5): mounted filesystem with ordered data
78 >>>> mode. Opts: (null)
79 >>>>
80 >>>> Would that suggest a corrupted /boot/grub/grub.conf file?
81 >>> Not necessarily. Can you manually mount /boot and see the contents of
82 >>> /boot/grub/grub.conf.
83 >>>
84 >>>> How did the system boot then?
85 >>> If grub can see the boot partition (and is correctly configured and
86 >>> installed on the MBR), it can mount the root system without problems
87 >>> regardless of fstab. Do you use an initramfs?
88 >>>
89 >>> Regards.
90 >> 'mount /boot' fails:
91 >> box0 ~ # mount /boot
92 >> mount: wrong fs type, bad option, bad superblock on /dev/sda1,
93 >> missing codepage or helper program, or other error
94 >> In some cases useful info is found in syslog - try
95 >> dmesg | tail or so
96 >>
97 >> No, I do not use 'initfamfs'.
98 >>
99 >> What do you suggest doing?
100 > Mounting it by hand:
101 >
102 > mount -t ext2 /dev/sda1 /boot
103 >
104 > Regards.
105 That did the trick. Thanks very much.
106
107 Here's my /boot/grub/grub.conf:
108 box0 linux # cat /boot/grub/grub.conf
109 # This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
110 #
111 http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
112 # If you are not using Genkernel and you need help creating this file, you
113 # should consult the handbook. Alternatively, consult the
114 grub.conf.sample that
115 # is included with the Grub documentation.
116
117 default 0
118 timeout 30
119 splashimage=(hd0,0)/boot/grub/splash.xpm.gz
120
121 title Gentoo Linux 3.8.13
122 root (hd0,0)
123 kernel /boot/kernel-3.8.13-gentoo root=/dev/sda3
124 #initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5
125
126 title Gentoo Linux 3.8.13 (rescue)
127 root (hd0,0)
128 kernel /boot/kernel-3.8.13-gentoo root=/dev/sda3 init=/bin/bb
129 # vim:ft=conf:
130
131 Is there anything that suggests as to why the /boot partition failed to
132 mount at system start-up?
133
134 Thanks.

Replies

Subject Author
Re: [gentoo-user] re: can't find /boot/grub/grub.conf after kernel upgrade [3.10.7] "Canek Peláez Valdés" <caneko@×××××.com>