[Top][All Lists]

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

Re: How does one add a second Ubuntu installation to an existing one?

From: Chris Green
Subject: Re: How does one add a second Ubuntu installation to an existing one?
Date: Fri, 21 May 2021 09:24:46 +0100

On Fri, May 21, 2021 at 08:52:18AM +0200, Pascal Hambourg wrote:
> Le 19/05/2021 à 14:02, Chris Green a écrit :
> > 
> > I've realised the easiest thing to do will be to simply duplicate my
> > existing xubuntu 20.10 installation on another partition.  As before
> > partitions are:-
> > 
> > /dev/nvme0n1p2 ext4     48174  15782  29877  35% /
> > /dev/nvme0n1p3 ext4    896193 295877 554724  35% /home
> > /dev/sdb1      ext4     10016    183   9306   2% /boot
> > /dev/sdb2      ext4    109596  33138  70850  32% /scratch
> > /dev/sda1      ext4    938772 222397 668666  25% /bak
> > /dev/sdc1      ext4    937872     77 890087   1% /mnt
> > 
> > If I simply copy / to /mnt and also copy /boot to / how do I get grub
> > to add the new partition to the boot menu?  (/dev/sdc is a SATA disk
> > so is visible to the BIOS so /boot can be on there with the OS)
> > 
> > Then if, when I ugrade my 'main' xubuntu 20.10 to 21.04, it falls in a
> > heap I can simply boot the xubuntu 20.10 on /dev/sdc1 and everything
> > will still work as before (if a little more slowly).
> Duplicate an installed system requires a few more steps because the copy
> uses different partitions. You need to adjust /etc/fstab and
> /boot/grub/grub.cfg with the new / UUID and no separate /boot.
I need a bit of clarification please.

So I've copied files as I said, with /dev/sdc1 being a copy of /dev/nvme0n1p2
plus a /boot directory containing what's in /dev/sdb1.

Yes, I understand I then need to change the /etc/fstab in the
/dev/sdc1 filesystem to point to the right places, I can do that OK.

How should I do the changes to /boot/grub/grub.cfg?  Do I edit
/etc/default/grub and then run grub-mkconfig?  However I don't really
see how this would work, I can set the output file for grub-mkconfig
but how do I tell it to use the /etc/default/grub in /dev/sdc1?

At what stage does the copy in /dev/sdc1 get added to my boot menu?

> I would also install GRUB on /dev/sdc from the copy to be able to boot if
> the original installation is so broken that even GRUB does not work any
> more.
Definitely, is that just a matter of booting the copy OS and running

Chris Green

reply via email to

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