Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.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:35:15
Message-Id: CADPrc81FBmb0K6dVb-A5PbKFCDdbnzf3VcUa7Yeh3yuevpBA9Q@mail.gmail.com
In Reply to: Re: [gentoo-user] re: can't find /boot/grub/grub.conf after kernel upgrade [3.10.7] by Alexander Kapshuk
1 On Sat, Sep 7, 2013 at 2:30 PM, Alexander Kapshuk
2 <alexander.kapshuk@×××××.com> wrote:
3 > On 09/07/2013 10:25 PM, Canek Peláez Valdés wrote:
4 >> On Sat, Sep 7, 2013 at 1:53 PM, Alexander Kapshuk
5 >> <alexander.kapshuk@×××××.com> wrote:
6 >>> On 09/07/2013 09:35 PM, Canek Peláez Valdés wrote:
7 >>>> On Sat, Sep 7, 2013 at 1:24 PM, Alexander Kapshuk
8 >>>> <alexander.kapshuk@×××××.com> wrote:
9 >>>>> On 09/07/2013 09:11 PM, Canek Peláez Valdés wrote:
10 >>>>>> On Sat, Sep 7, 2013 at 1:06 PM, Alexander Kapshuk
11 >>>>>> <alexander.kapshuk@×××××.com> wrote:
12 >>>>>>> Howdy,
13 >>>>>>>
14 >>>>>>> Just compiled the new kernel [3.10.7], was about to edit my
15 >>>>>>> /boot/grub/grub.conf, and found it missing:
16 >>>>>>> box0 boot # pwd
17 >>>>>>> /boot
18 >>>>>>> box0 boot # ls -a
19 >>>>>>> . .. kernel-3.10.7-gentoo kernel-3.8.13-gentoo
20 >>>>>>>
21 >>>>>>> What did I miss?
22 >>>>>> Do you have /boot in a separated partition? Did you mounted it?
23 >>>>>>
24 >>>>>> Nothing should touch /boot, AFAIK.
25 >>>>>>
26 >>>>>> Regards.
27 >>>>> I do have '/boot' on a separate partition. If I understand it correctly,
28 >>>>> '/boot' gets mounted every time at system start-up, based on
29 >>>>> '/etc/fstab', does it not?
30 >>>> By the contents of your fstab, it should...
31 >>>>
32 >>>>> box0 boot # cat /etc/fstab
33 >>>>> <snip>
34 >>>>> /dev/sda1 /boot ext2 default,noatime 0 2
35 >>>>> /dev/sda2 none swap sw 0 0
36 >>>>> /dev/sda3 / ext4 noatime 0 1
37 >>>>> /dev/sda5 /home ext4 noatime 0 2
38 >>>>> /dev/cdrom /mnt/cdrom auto noauto,ro 0 0
39 >>>>>
40 >>>>>
41 >>>>> box0 boot # mount|grep /dev/sda
42 >>>>> /dev/sda3 on / type ext4 (rw,noatime,data=ordered)
43 >>>>> /dev/sda5 on /home type ext4 (rw,noatime)
44 >>>> ,,,however mount says up there that it's not mounted.
45 >>>>
46 >>>>> box0 boot # fdisk -l /dev/sda
47 >>>>>
48 >>>>> Disk /dev/sda: 250.1 GB, 250059350016 bytes, 488397168 sectors
49 >>>>> Units = sectors of 1 * 512 = 512 bytes
50 >>>>> Sector size (logical/physical): 512 bytes / 512 bytes
51 >>>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
52 >>>>> Disk identifier: 0x00000000
53 >>>>>
54 >>>>> Device Boot Start End Blocks Id System
55 >>>>> /dev/sda1 * 2048 67583 32768 83 Linux
56 >>>>> /dev/sda2 67584 1116159 524288 82 Linux swap / Solaris
57 >>>>> /dev/sda3 1116160 43059199 20971520 83 Linux
58 >>>>> /dev/sda4 43059200 488397167 222668984 5 Extended
59 >>>>> /dev/sda5 43061248 488397167 222667960 83 Linux
60 >>>> For some reason your /boot partition didn't get mounted. See the boot
61 >>>> logs, and try to mounting by hand. Perhaps the fsck failed or it needs
62 >>>> manual intervention.
63 >>>>
64 >>>> Regards.
65 >>> Based on the 'dmesg' output below, EXT2-fs attempted to mount the '/'
66 >>> partition instead of the '/boot' one.
67 >>>
68 >>> box0 ~ # dmesg|grep 'EXT.*fs'
69 >>> [ 2.444214] EXT2-fs (sda3): error: couldn't mount because of
70 >>> unsupported optional features (240)
71 >>> [ 2.444736] EXT4-fs (sda3): couldn't mount as ext3 due to feature
72 >>> incompatibilities
73 >>> [ 2.481412] EXT4-fs (sda3): mounted filesystem with ordered data
74 >>> mode. Opts: (null)
75 >>> [ 9.448819] EXT4-fs (sda3): re-mounted. Opts: (null)
76 >>> [ 9.731383] EXT4-fs (sda5): mounted filesystem with ordered data
77 >>> mode. Opts: (null)
78 >>>
79 >>> Would that suggest a corrupted /boot/grub/grub.conf file?
80 >> Not necessarily. Can you manually mount /boot and see the contents of
81 >> /boot/grub/grub.conf.
82 >>
83 >>> How did the system boot then?
84 >> If grub can see the boot partition (and is correctly configured and
85 >> installed on the MBR), it can mount the root system without problems
86 >> regardless of fstab. Do you use an initramfs?
87 >>
88 >> Regards.
89 > 'mount /boot' fails:
90 > box0 ~ # mount /boot
91 > mount: wrong fs type, bad option, bad superblock on /dev/sda1,
92 > missing codepage or helper program, or other error
93 > In some cases useful info is found in syslog - try
94 > dmesg | tail or so
95 >
96 > No, I do not use 'initfamfs'.
97 >
98 > What do you suggest doing?
99
100 Mounting it by hand:
101
102 mount -t ext2 /dev/sda1 /boot
103
104 Regards.
105 --
106 Canek Peláez Valdés
107 Posgrado en Ciencia e Ingeniería de la Computación
108 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] re: can't find /boot/grub/grub.conf after kernel upgrade [3.10.7] Alexander Kapshuk <alexander.kapshuk@×××××.com>