1 |
On Mon, 17 Aug 2015, jfmxl wrote: |
2 |
> but no joy. When I rebooted the machine I saw the grub and a bunch of |
3 |
> initializations whizzed by ... but the kernel failed to mount root. |
4 |
|
5 |
Sounds pretty much like grub is passing the wrong root parameter. |
6 |
|
7 |
> I opened a shell and looked at /etc/fstab, but found a /dev/ram0 and a |
8 |
> /proc and nothing like what I'd entered ... I'd followed the program in |
9 |
> the handbook. |
10 |
|
11 |
Would that be the rescue shell within the initramfs? In that case that's |
12 |
fine, I see the same thing in a genkernel initramfs. |
13 |
|
14 |
> When I tried to unmount the /mnt/gentoo (formerly) chroot partition at |
15 |
> the end the complaint was that something using it ... I couldn't |
16 |
> discover what that was, |
17 |
|
18 |
If you did mount --rbind on sys and dev and then tried to umount than I |
19 |
can tell you I always fail to unmount these properly. Rebooting (software |
20 |
reboot) is fine. |
21 |
|
22 |
> after waiting an retrying several times, I just |
23 |
> shut the vm down and restarted ... with the result above. Is there any |
24 |
> hope of rescuing this? |
25 |
|
26 |
Should be entirely salvageable. |
27 |
|
28 |
> Since I installed the whole system to a qemu 'partition' inside a binary file |
29 |
> I have no access to what I've done or failed to do. So I guess I'm just out of |
30 |
> luck? |
31 |
|
32 |
You can simply reboot the livecd within the VM and just go to the 'chroot` |
33 |
step. You could also mount the binary disk image on the host; depending on |
34 |
what type of image you're using the instructions are both here |
35 |
|
36 |
https://en.wikibooks.org/wiki/QEMU/Images#Mounting_an_image_on_the_host |
37 |
|
38 |
The only thing you're missing is the proper bootloader/initramfs |
39 |
configuration, so go back to this part. |
40 |
|
41 |
> To install an initramfs, install sys-kernel/genkernel first, then have it |
42 |
> generate an initramfs: |
43 |
> root #emerge genkernel |
44 |
> root #genkernel --install initramfs |
45 |
> |
46 |
> So yes, that's what I did, apparently. |
47 |
|
48 |
Without knowing the specifics of your setup, here's the steps I would take |
49 |
to fix it: |
50 |
|
51 |
1. regenerate genkernel initramfs; you can try to specify a default |
52 |
real_root by executing genkernel --real-root, or in |
53 |
/etc/genkernel.conf. But it seems to me that if the correct root |
54 |
parameter from grub is passed then things should work. |
55 |
|
56 |
2. grub2-mkconfig again; check the created grub.cfg to see that sane |
57 |
flags are being passed to the kernel. |
58 |
|
59 |
3. try booting |
60 |
|
61 |
4. if you don't have a freaky partition setup and the filesystem/block |
62 |
device controller modules are built-into the kernel, you can try to |
63 |
launch the kernel directly from grub-cmdline. Something like |
64 |
|
65 |
set root='hd0,2' |
66 |
linux /boot/vmlinuz-whatever root=/dev/sda4 |
67 |
boot |
68 |
|
69 |
should work (plug in the right partition numbers). This is actually |
70 |
what I would do, initramfs only as a last resort. |
71 |
|
72 |
if these don't work then you still have step 5: |
73 |
|
74 |
5. generate a dracut initramfs and redo steps 2 and 3. Dracut can |
75 |
generate and save a kernel cmdline within itself which should fix any |
76 |
problems. |
77 |
|
78 |
> ... Ill give it another shot, but I won't stick around on this damn list any |
79 |
> longer. |
80 |
|
81 |
Seems pretty rash to run away after one email, don't you think? |