Boot confusion
Liam Proven
lproven at gmail.com
Tue Jun 8 17:20:46 UTC 2021
On Tue, 8 Jun 2021 at 01:00, Jack McGee <jack at greendesk.net> wrote:
> > OK, so disk #1 is the 250GB SSD.
>
> Which is the current root filesystem.
Yes, looks that way.
NOTE: I am editing your comments into a different order for clarity.
> See if this would be simpler. I bought the 1tbSSD (/dev/sdd) to replace
> the 250 gig ssd (/dev/sde). To be the new root filesystem with grub.
OK, several points here.
[1] It's *not* /dev/sdd. Also you have a bunch of stuff with mount
points that do not match the actual device names of the disk.
Suggestion: *do not use* device names for mount points. They will not
update and as you add or remove disks, then you get to a very
confusing situation -- which is where you are now.
[2] Then you say:
> What would I need to do change the root filesystem from /dev/sde (250gig
> SSD) to /dev/sdd (1tb SSD) and put grub on /dev/sdd. the 1tb SSD is empty.
I will come back to that. It's _not_ empty. It has a 930GB Linux
filesystem on it.
We can talk about moving stuff later, no worries. 1TB is an awful lot
for a root partition though. You could fit a dozen operating systems
into 1TB comfortably with room to spare.
So first, you need to look at what is on that 1TB disk.
If the partition is empty, then for now, delete it.
Another suggestion: Name and/or label your partitions.
A "name" is a field in the partition table; a "label" is the old
DOS-style volume label, it's in the filesystem. Labels are easy, names
only work on GPT I think.
GParted can set these names, even on mounted disks, without
reformatting or anything.
This means you can label partitions with descriptive names. When Linux
automatically mounts a _named_ partition, it creates a mountpoint
using that name. This is a big help keeping things straight.
I suggest you sit there with a piece of paper, look into all your
partitions from your normal running OS, write down descriptions of
what is there and on what device. IGNORE mount points. Yours are
misleadingly named and that's dangerous because you could get
confused.
As an example, here's what `fdisk` shows on my machine:
Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SK hynix SC308 S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A75D21DB-59EC-4753-AAC2-9179FC28DCFB
Device Start End Sectors Size Type
/dev/sda1 2048 63487 61440 30M BIOS boot
/dev/sda2 63488 100732927 100669440 48G Linux filesystem
/dev/sda3 134287360 973154303 838866944 400G Linux filesystem
/dev/sda4 973154304 1000214527 27060224 12.9G Linux swap
/dev/sda5 100732928 134287359 33554432 16G Linux filesystem
(I hacked a 2nd distro onto this machine after I installed it. It's
not elegant.)
This is not very informative, right? But I've named them, too.
# parted -l
Model: ATA SK hynix SC308 S (scsi)
Disk /dev/sda: 512GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: pmbr_boot
Number Start End Size File system Name Flags
1 1049kB 32.5MB 31.5MB BIOS boot bios_grub
2 32.5MB 51.6GB 51.5GB btrfs Leap root legacy_boot
5 51.6GB 68.8GB 17.2GB ext4 Gecko root
3 68.8GB 498GB 429GB xfs Home
4 498GB 512GB 13.9GB linux-swap(v1) Swap swap
>From the list of names, you can see what's where: I have a GRUB
bios-boot partition, a root partition for openSUSE Leap, a root
partition for openSUSE Tumbleweed (well, the GeckoLinux distro of it),
a home partition called "Home" and a swap partition called "swap".
On my personal laptop, I have 2 SSDs, with partitions labelled:
"Win10"
"Shared data"
"Ubuntu root"
"Ubuntu home"
"Swap".
When you can deal in names, it's much easier than slash-dev-slash-this
and slash-dev-slash-that -- and those auto-generated names _change_
when you move a disk from one SATA port to another.
I suggest before you make any other changes, you go through all your
partitions and work out what's in them.
Then boot from a USB key and give them meaningful labels, such as:
"Ubuntu 1 root"
"Ubuntu 2 root"
"Home"
"Old Win #1"
"Old Win #2"
"Old Ubuntu root"
"Old Ubuntu home"
"Old swap"
"Swap"
Give 'em all nice clear meaningful names, and it will make it _way_
easier to avoid making a horrible mistake later.
There are other ways to list stuff, e.g. this command:
sudo lsblk -o name,mountpoint,label,size,uuid
I got that from here:
https://unix.stackexchange.com/questions/14165/list-partition-labels-from-the-command-line
>
> What would I need to do change the root filesystem from /dev/sde (250gig
> SSD) to /dev/sdd (1tb SSD) and put grub on /dev/sdd.
I don't want to make recommendations based on this, because it's *not* /dev/sdd.
>
> The rest can go away. This machine has had many instances of Ubuntu on
> it over the years. And started as Windows XP!
OK, well then, I'd suggest
[1] labelling them all those partitions meaningfully, then
[2] turning the PC off and disconnecting all the drives except the
ones we'll be dealing with: old SSD, new SSD, big HDD.
Then we will see what's called what. :-)
--
Liam Proven – Profile: https://about.me/liamproven
Email: lproven at cix.co.uk – gMail/gTalk/gHangouts: lproven at gmail.com
Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven
UK: +44 7939-087884 – ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053
More information about the ubuntu-users
mailing list