| Summary: | grub not working on Mageia 2b2 (x86_64) rescue system | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Herbert Poetzl <herbert> |
| Component: | Release (media or process) | Assignee: | Thierry Vignaud <thierry.vignaud> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | Normal | CC: | dmorganec, herbert, sysadmin-bugs |
| Version: | Cauldron | Keywords: | NEEDINFO |
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | drakx-installer-rescue | CVE: | |
| Status comment: | |||
|
Description
Herbert Poetzl
2012-04-02 02:33:36 CEST
thierry any ideas ? Assignee:
bugsquad =>
thierry.vignaud Tried strace? It may miss some file (eg: you may not have mounted /boot) and grub reports a bogus error just to complete if it doesn't work seems x86_64 only because i juste tested and works on i586 CC:
(none) =>
dmorganec You meant you failed to rescue a 32bit system with a 64bit rescue? (In reply to comment #2) > Tried strace? # strace -fF grub execve("/sbin/grub", ["grub"], [/* 17 vars */]) = -1 ENOENT (No such file or directory) dup(2) = 3 fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fstat(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 64), ...}) = 0 ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 opost isig icanon echo ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbc36cdd000 lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) write(3, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory ) = 40 close(3) = 0 munmap(0x7fbc36cdd000, 4096) = 0 exit_group(1) = ? my guess would be that it requires certain 32bit libraries which are not present CC:
(none) =>
herbert # ldd /sbin/grub linux-gate.so.1 => (0xffffe000) libc.so.6 => /lib/libc.so.6 (0xf7597000) /lib/ld-linux.so.2 => not found you should _chroot_ Status:
NEW =>
RESOLVED (In reply to comment #4) > You meant you failed to rescue a 32bit system with a 64bit rescue? nope, I'm trying to write a grub boot block onto a disk, (previous install was 64bit) normally I'd just start 'grub' and get a grub shell to fix issues (like a broken grub boot block or setup) (In reply to comment #7) > you should _chroot_ chroot where? and why isn't that done when I open a rescue shell if it is required? Status:
RESOLVED =>
REOPENED If you don't use the repair menu and ask for a console, you got a console on the rescue system. If you asked to mount your system, then it's in /mnt and you should chroot in it as I tried to communicate (several times, but obviously failed), the _grub_ binary on the _64bit_ _install_dvd_ when booting in _rescue_ mode and entering the console doesn't work, most likely because the binary is 32bit dynamic and the required library is missing. here the precise steps to recreate the issue on your system: 1a. qemu-kvm -cdrom Mageia-2-beta2-x86_64-DVD.iso or 1b. boot from the actual DVD 2. select 'Rescue System' 3. select 'Go to console' 4. grub as I tried to communicate (several times, but obviously failed), you need to mount your / (see the menu), then the library will be automatically found from /mnt/lib Status:
REOPENED =>
RESOLVED well, I tried, here are the steps: 1a. qemu-kvm -hda mga2b2.qcow2 -cdrom Mageia-2-beta2-x86_64-DVD.iso -boot d 1b. boot from the actual DVD and have a preinstalled system (64bit) 2. select 'Rescue System' 3. select 'Mount your partitions under /mnt' 3. select 'Go to console' 4. grub [root@rescue /]# grub bash: /sbin/grub: No such file or directory [root@rescue /]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/loop0 24832 24832 0 100% /tmp/stage2 tmpfs 59988 4 59984 1% /run devtmpfs 51120 0 51120 0% /dev tmpfs 59988 0 59988 0% /dev/shm /dev/sda1 1802600 400212 1312076 24% /mnt and what a surprise, adding the _missing_ ld-linux.so.2 to the stage2 /lib makes grub work as intended. Status:
RESOLVED =>
REOPENED note that if it is not planned to actually _use_ the /sbin/grub binary from the 64bit ISO, then you can safely remove /lib/libc.so.6 as well, as the grub binary seems to be the only dynamic 32bit binary depending on it ... Fixed in git Status:
REOPENED =>
RESOLVED |