Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED - typo]/boot directory: grub/lilo/grub2 cannot read
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Sun Aug 05, 2012 2:36 am    Post subject: [SOLVED - typo]/boot directory: grub/lilo/grub2 cannot read Reply with quote

I'm building an x86_64 install of Gentoo on my Dell Inspiron laptop. I've had the 32 bit system on for sometime, but haven't been able to take advantage of the 6 GBs or memory. I had installed crossdev and got caught up in a horrendous python upgrade issue that I bit the bullet and decided to re-install, but this time with a 64 bit system.

I tried using the old grub, and I'd get to the splash screen and could select my system, but when I entered the only choice, grub complained it could "not find file" which I'm guessing was the second line of my old grub conf:

Code:
(chroot) livecd / # cat /boot/grub/grub.conf
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

#title Gentoo Linux 2.6.24-r5
#root (hd0,0)
#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/sda3
#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5

# vim:ft=conf:
root (hd0,0)
kernel     /boot/kernel-genkernel-x86_64-3.8.8-gentoo root=/dev/ram0 real_root/dev/sda3
initrd /boot/initramfs-genkernel-x86_64-3.8.8-gentoo

(chroot) livecd / #



I'm guessing the error was being triggered when trying to read the initramifs... file, but I cannot say for sure.

I then tired lilo, and here's what happened:

Code:
(chroot) livecd / # cat /etc/lilo.conf
boot=/dev/sda
prompt
timeout=50
default=gentoo

image=/boot/kernel-genkernel-x86_64-3.8.8-gentoo
   label=gentoo
   read-only
   root=/dev/ram0
   append="real_root=/dev/sda3"
   initrd=/boot/initramfs-genkernel-x86_64-3.8.8-gentoo

(chroot) livecd / # lilo
Warning: LBA32 addressing assumed
Fatal: open /boot/kernel-genkernel-x86_64-3.8.8-gentoo: No such file or directory
(chroot) livecd / # ls -la /boot
total 8987
drwxr-xr-x  5 root root    1024 Aug  4 19:08 .
drwxr-xr-x 21 root root    4096 Aug  4 19:05 ..
lrwxrwxrwx  1 root root       1 Aug  4 19:01 boot -> .
drwxr-xr-x  2 root root    1024 Aug  4 15:28 grub
drwxr-xr-x  6 root root    1024 Aug  4 18:42 grub2
-rw-r--r--  1 root root 3993393 Aug  4 15:26 initramfs-genkernel-x86_64-3.3.8-gentoo
-rw-r--r--  1 root root       0 Aug  4 17:53 .keep
-rw-r--r--  1 root root 3273840 Aug  4 15:24 kernel-genkernel-x86_64-3.3.8-gentoo
drwx------  2 root root   12288 Aug  4 15:19 lost+found
-rw-r--r--  1 root root 1873757 Aug  4 15:24 System.map-genkernel-x86_64-3.3.8-gentoo
(chroot) livecd / # fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf6996217

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048       67583       32768   83  Linux
/dev/sda2           67584     1116159      524288   82  Linux swap / Solaris
/dev/sda3         1116160  1250263727   624573784   83  Linux
(chroot) livecd / #


I also tried grub2, but booting would always drop me into the rescue shell.

So the problem I am experiencing is that my first partition, /boot, can be read by my operating system (CD booted), and seldomly by any of the three bootloaders. I suspected a problem with the disk, but badblocks comes back with a PASS:
Quote:
(chroot) livecd / # badblocks -v /dev/sda1 >badblocks
Checking blocks 0 to 32767
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found. (0/0/0 errors)
(chroot) livecd / #


So I'm perplexed... /boot appears to be working, I can write files to it, but the three bootloaders are now having problems, all tripping up on not being able to find the files. I'm wondering if this is a roving /dev issue -- could /dev/sda1 be something else at boot time only to settle on being assigned to the /sda1 after boot? I recall something similar to device names changing when installing Gentoo originally on this uncertified laptop and concluding it was something of a coconut shell game.

I originally assigned ext2 to the first parition, as has been my habit for the last 10 years when installing Gentoo. Then I read something that said that genkernel in later kernels did not automatically support ext2. So I mkfs.ext3 and change my /etc/fstab to designated ext3 for the first partition and then rerun genkernel and grub to populate /boot. Everything suggests /boot is now ext3.

I guess the last thing I'm thinking of is could this be an encoding issue? But UTF-8 shouldn't matter, if that's was is applied, since all the characters are in the shared name space of <128.

Any suggestions or tests?

Lastly, for grub2, could this be an incompatability with genkernel creating file names (without extensions) that grub2 expects?


Last edited by jlpoole on Sun Aug 05, 2012 4:02 am; edited 1 time in total
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Sun Aug 05, 2012 3:47 am    Post subject: Reply with quote

Here's the verbose output:
Code:
(chroot) livecd / # lilo -v 5
LILO version 22.8, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2006 John Coffman
Released 19-Feb-2007 and compiled at 16:27:11 on Aug  4 2012
Running Linux kernel 3.2.12-gentoo on x86_64

Warning: LBA32 addressing assumed
device-mapper major = 253
raid_setup: dev=0005  rdev=0800
raid_setup returns offset = 00000000  ndisk = 0
 BIOS   VolumeID   Device
Reading boot sector from /dev/sda
geo_get: device 0800, all=1
pf_hard_disk_scan: (7,0) /dev/loop0
pf_hard_disk_scan: (8,0) /dev/sda
pf_hard_disk_scan: (8,1) /dev/sda1
lookup_dev:  number=0800
lookup_dev:  number=0800
pf:  dev=0800  id=F6996217  name=/dev/sda
geo_query_dev: device=0800
lookup_dev:  number=0800
lookup_dev:  number=0300
exit geo_query_dev
pf_hard_disk_scan: (8,2) /dev/sda2
pf_hard_disk_scan: (8,3) /dev/sda3
pf_hard_disk_scan: (11,0) /dev/sr0
Caching device /dev/sr0 (0x0B00)
  0800  F6996217  /dev/sda
pf_hard_disk_scan: ndevs=1
  0800  F6996217  /dev/sda
Resolve invalid VolumeIDs
Resolve duplicate VolumeIDs
  0800  F6996217  /dev/sda
device codes (user assigned pf) = 0
device codes (user assigned) = 0
device codes (BIOS assigned) = 0
Filling in '/dev/sda' = 0x80
device codes (canonical) = 1
geo_query_dev: device=0800
lookup_dev:  number=0800
lookup_dev:  number=0300
exit geo_query_dev
Device 0x0800: BIOS drive 0x80, 255 heads, 12289 cylinders,
               63 sectors. Partition offset: 0 sectors.
registering bios=0x80  device=0x0800
Using Volume ID F6996217 on bios 80
geo_get: device 0801, all=1
geo_query_dev: device=0801
lookup_dev:  number=0801
lookup_dev:  number=0300
exit geo_query_dev
Device 0x0801: BIOS drive 0x80, 255 heads, 12289 cylinders,
               63 sectors. Partition offset: 2048 sectors.
registering bios=0x80  device=0x0801
Using Volume ID F6996217 on bios 80
fd 5: offset 2048 -> dev 0xe0, LBA 15228
Warning: Unable to determine video adapter in use in the present system.
Using MENU secondary loader
Calling map_insert_data
fd 5: offset 2560 -> dev 0xe0, LBA 15229
fd 5: offset 3072 -> dev 0xe0, LBA 15230
fd 5: offset 3584 -> dev 0xe0, LBA 15231
fd 5: offset 4096 -> dev 0xe0, LBA 15232
fd 5: offset 4608 -> dev 0xe0, LBA 15233
fd 5: offset 5120 -> dev 0xe0, LBA 15234
fd 5: offset 5632 -> dev 0xe0, LBA 15235
fd 5: offset 6144 -> dev 0xe0, LBA 15236
fd 5: offset 6656 -> dev 0xe0, LBA 15237
fd 5: offset 7168 -> dev 0xe0, LBA 15238
fd 5: offset 7680 -> dev 0xe0, LBA 15239
fd 5: offset 8192 -> dev 0xe0, LBA 15240
fd 5: offset 8704 -> dev 0xe0, LBA 15241
fd 5: offset 9216 -> dev 0xe0, LBA 15242
fd 5: offset 9728 -> dev 0xe0, LBA 15243
fd 5: offset 10240 -> dev 0xe0, LBA 15244
fd 5: offset 10752 -> dev 0xe0, LBA 15245
fd 5: offset 11264 -> dev 0xe0, LBA 15246
Secondary loader: 18 sectors (0x3600 dataend).
install(2) flags: 0x0302
fd 5: offset 11776 -> dev 0xe0, LBA 15247
bios_boot = 0x80  bios_map = 0x80  map==boot = 0  map S/N: F6996217
Map time stamp: 501DE627
BIOS data check will include auto-suppress check

check_options: "ro root=100 real_root=/dev/sda3"
fd 5: offset 12288 -> dev 0xe0, LBA 15250
fd 5: offset 12800 -> dev 0xe0, LBA 15251
Boot image: /boot/kernel-genkernel-x86_64-3.8.8-gentoo
Fatal: open /boot/kernel-genkernel-x86_64-3.8.8-gentoo: No such file or directory
Removed temporary file /boot/map~
(chroot) livecd / #


Then I appear to have updated the partition table:
Quote:
(chroot) livecd / # /sbin/lilo -A /dev/sda
No active partition found on /dev/sda
(chroot) livecd / # /sbin/lilo -A /dev/sda1
Fatal: Not a device with partitions '/dev/sda1'
(chroot) livecd / # /sbin/lilo -q
Warning: LBA32 addressing assumed
Fatal: open /boot/map: No such file or directory
(chroot) livecd / # /sbin/lilo -A /dev/sda
No active partition found on /dev/sda
(chroot) livecd / # /sbin/lilo -A /dev/sda N==0
Fatal: Not a number: "N==0"
(chroot) livecd / # /sbin/lilo -A /dev/sda 1
pt[1] -> 80
The partition table has been updated.
(chroot) livecd / # /sbin/lilo -A /dev/sda
/dev/sda1
(chroot) livecd / #


Still, lilo fails to /open/boot;kernel...

Then this:
Code:
(chroot) livecd / # /sbin/lilo -b /dev/sda
Warning: Ignoring entry 'boot'
Warning: LBA32 addressing assumed
Fatal: open /boot/kernel-genkernel-x86_64-3.8.8-gentoo: No such file or directory
(chroot) livecd / #
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Sun Aug 05, 2012 4:02 am    Post subject: Reply with quote

Ouch: My typo of "3.8.8" vs. "3.3.8" caused the mismatch.

Lilo worked now (and probably GRUB and GRUBw will, too) and I've reached the open login prompt.

That cost me about 7 hours.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum