help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change /boot disk?


From: Pascal-liste
Subject: Re: How to change /boot disk?
Date: Fri, 10 Jan 2020 21:22:22 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.3.0

Le 10/01/2020 à 13:27, Simon Hobson a écrit :
Chris Green <address@hidden> wrote:

So what's the easiest/simplest way to move /boot from one SATA drive
to another?  In my case I want to move it from /dev/sda1 to /dev/sdb1.
There's nothing on either sda1 or sdb1 that needs to be preserved.

Several ways cone to mind, but probably what I'd do is :

• partition your current sdb so it has an appropriately sized boot partition on 
it - setting flags accordingly (bootable, active, whatever)
• create a new filesystem on it
• copy all the files from your current /boot
For this, I'd normally use rsync - a bit overkill but it's my tool for choice for copies 
that involve large amounts of stuff or enclosed directories. "rsync -av /boot 
/mnt" assuming your new boot is mounted on /mnt
• Get the new UID for the filesystem and edit your fstab

Shutdown the system cleanly, remove your old spinning disk, see if it boots

It won't boot, because GRUB is not installed on the new boot disk and grub.cfg is not updated with the new /boot UUID. Several steps are required before rebooting.

Unmount the old /boot.
Mount the new /boot.
Install GRUB on the new boot disk with grub-install /dev/sdb.
Update grub.cfg with update-grub.
Now you can reboot.

If not, I reach for my trusty Grub rescue stick 
(https://www.supergrubdisk.org/?pid=10, works nicely on a USB memory drive).

It is better to not break things than fixing them.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]