[nmglug] two bootable OSes on one SSD?

Sam Noble s at mnoble.net
Fri Jan 15 15:22:56 PST 2021


On Fri, Jan 15, 2021 at 03:18:33PM -0700, Brian O'Keefe wrote:
> Hello all,
> 
> I hope everyone is safe and secure these days. This weekend promises to be
> eventful one way or another so I'm holding on to the seat with both hands!
> 
> I have an Asus laptop with a 256GiB SSD. I installed Ubuntu 20.04 on it and
> all is fine except for my own screw-ups, mostly. After I installed the OS I
> copied over from the 1TB drive I had been using. I only copied what I needed
> or used frequently, leaving the remaining data on the 1TB drive. Now I'm
> wondering if there is a way to partition the 1 TB drive so I have its
> existing bootable Ubuntu and cloning my currently used, the 20.04 OS at
> about 200GiB full, onto the 1TB drive in a new, bootable partition. Then I
> would choose which to boot if I want to use them for separate work. Also
> could I access the data from one partition to the other in use? I currently
> can either boot the 1TB disc from a USB connection or just mount it as a
> storage device and get the info I want from it. At the same time I could
> grow the 256GiB partition to 512GiB and have all the storage I need.
> 
> Just a thought but intriguing and especially as I watch my remaining disc
> capacity on the 256GiB drive slowly shrink.
> 
> Many thanks folks and I wish all the best for this year and this weekend!
> 
> Brian
> 

Brian I think you're just describing a standard dual boot scenario.
You're only complications will come from the two installs already
existing, and the troubles you might get into trying to move them
around.
(e.g. imagine you confuse the destination partition when copying and
overwrite one that doesn't have a good backup.) 

But yeah it's totally doable. Plug in the TB drive "as a storage device"
unmount it and run something like gparted to resize it's partitions
until you've got your 512G of free space, then create the partitions for
the future copy of the 256G in that free space. Then boot from it and image
the 256G drive into the new partitions. (Lots of options here, I'd say make
the new filesystems by hand or using gparted in the previous step, then
use tar or your tool to copy the data from (each partition of) of the 256.
All that's left then is to munge the grub config to know about the new
second install. And yeah no reason you can't mount all the partitions in
both installs to get access to all the files regarless of booted OS.

Lots of places for something to go wrong, so I wouldn't start unless you
have backups you're comfortable with. But nothing too tricky either.

-- 
sam


More information about the nmglug mailing list