GRUB trouble, Help needed

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GRUB trouble, Help needed

Volker Wysk
Hi.

I have been building a maintenance system on an USB stick, and botched
it. I've used the Ubuntu installer and the MBR got written to the wrong
disk, namely the first hard disk (an SSD in my case) instead of the USB
stick.

I've done it again, doing it right, and can now boot from the new USB
stick. But I can't boot my main system any longer, which had been
started from /dev/sda.

I can access my encrypted root partition from the maintenance USB
stick, and mounted it to /mnt/root. Then I've tried this:

mount --rbind /dev /mnt/root/dev
mount --rbind /proc /mnt/root/proc
mount --rbind /sys /mnt/root/sys
chroot /mnt/root
update-initramfs -u
grub-install /dev/sda
update-grub

This is by Colin Watson in ubuntu-users at Mon, 3 Sep 2018. He said it
goes "roughly" like this.

What am I missing?

Greetings,
Volker


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

(SOLVED) Re: GRUB trouble, Help needed

Volker Wysk
Am Samstag, den 05.10.2019, 18:44 +0200 schrieb Volker Wysk:

> Hi.
>
> I have been building a maintenance system on an USB stick, and
> botched
> it. I've used the Ubuntu installer and the MBR got written to the
> wrong
> disk, namely the first hard disk (an SSD in my case) instead of the
> USB
> stick.
>
> I've done it again, doing it right, and can now boot from the new USB
> stick. But I can't boot my main system any longer, which had been
> started from /dev/sda.
>
> I can access my encrypted root partition from the maintenance USB
> stick, and mounted it to /mnt/root. Then I've tried this:
>
> mount --rbind /dev /mnt/root/dev
> mount --rbind /proc /mnt/root/proc
> mount --rbind /sys /mnt/root/sys
> chroot /mnt/root
> update-initramfs -u
> grub-install /dev/sda
> update-grub
>
> This is by Colin Watson in ubuntu-users at Mon, 3 Sep 2018. He said
> it
> goes "roughly" like this.

I've found out what went wrong. I forgot to mount the /boot partition
on the main system, before doing the procedure above. It should go:

mount --rbind /dev /mnt/root/dev
mount --rbind /proc /mnt/root/proc
mount --rbind /sys /mnt/root/sys
mount /dev/sda1 /mnt/root/boot
chroot /mnt/root
update-initramfs -u
grub-install /dev/sda
update-grub
 

Cheers,
Volker


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users