Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3260

Installation • [Solved] Cannot boot after cloning install on a new laptop: tries to mount wrong partition

$
0
0
Hello,

I've been trying to clone an existing debian-testing install on a new laptop, using the following guide: https://dev.to/nikvdp/how-to-easily-clo ... chine-2pbl
After completing the instructions and updating /etc/fstab to match the new UUIDs, I started the computer, the GRUB screen looked fine, but during initialisation I first got the following error:

mdadm: cannot find arrays or config... (can't exactly remember the exact message..)

Then I tried to repair the boot from chroot with update-initramfs, grub-install and update-grub, but it got worse. Now I get:

fsck: fsck.vfat not found; ignore /dev/sda1
mount: mounting /dev/sda1 on /root failed: No such device
Failed to mount /dev/sda1 as root file system.


And I get the (initramfs) prompt.

Somehow, it seems like it tries to boot on sda1 which is my efi partition, instead of sda2 which is root. So far, I have tried to:
-Repair the boot using update-initramfs -u, install-grub /dev/sda and grub-update, both from a debian-live usb using bind mount and chroot, and from rescue mode (rescue/enable=true) with a root shell. No errors when executing the scripts, but it doesn't solve the problem.
-Type 'root=/dev/sda2', then 'exit' in the initramfs prompt. Doesn't work the first time, causes kernel panic when I try again.
-In /etc/fstab, replace UUIDs with corresponding "/dev/sdX", then relaunch update-initramfs etc. Still the same result.

What bothers me is that the Grub config looks alright. Right UUIDs (checked with blkid), right (hdX,gptX), etc. So I'm suspecting that update-initramfs does something weird, somehow flags /dev/sda1 as root on the image, which screws the boot process (since it is the command that got me there in the first place...) ?

Does someone have any idea how to solve this mess ?

thanks

Statistics: Posted by petroblues — 2024-08-02 21:40 — Replies 2 — Views 146



Viewing all articles
Browse latest Browse all 3260

Trending Articles