help-grub
[Top][All Lists]
Advanced

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

Re: How to install grub onto an added drive?


From: sashab
Subject: Re: How to install grub onto an added drive?
Date: Mon, 18 Nov 2019 22:00:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Hi Pascal,

On 11/18/19 9:42 PM, Pascal Hambourg wrote:
> Le 18/11/2019 à 20:44, sashab a écrit :
>>
>> fist of all: A fresh install will be much less pain ;)
> 
> But so much less fun.
> 
+1

>> Moving '/' to new device:
>> You'll have to boot a "live system" from a CD,
>> to copy your rootfs.
> 
> No, you don't. You can do it from the installed system.
> 
Yes, but then i'd suggest to
    mount -o remount,ro /
so you don't have to run after a moving target.

>> It would be better to create a new fs on /dev/nvme0p?
>> and rsync all files.
> 
> Better than what ? Cloning the raw partition then extending the
> filesystem ? Why ?
> 
Because this way you can't fckp having two different fs'es with same UUIDs.
(E.g. in case you forget to resize and keep both drives for the next boot.)

Furthermore (especially in case of ext4) only mkfs can make some
optimized decisions on fs-structure/superblocks/inode-balancing/etc.
resize2fs has to stick with some pre-made choices
in order not to break your data and to work in-place.

>> If you have no separate boot partition
> 
> Actually I am failing to understand whether the small boot drive will be
> the current SSD or a new empty drive.
> 
>> However, you'll need to
>>      dpkg-reconfigure grub-pc
>> (or however the package's name is on xubuntu)
>> so that future updates of grub get installed on the right drive.
> 
> Good catch. Actually if you are familiar with using chroot you could
> even do this after chrooting to the new root filesystem instead of
> running grub-install and grub-mkconfig (or update-grub) as it will also
> perform both operations.
> 

Greets,
    sashab



reply via email to

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