LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-21-2020, 09:32 PM   #1
Fairway
Member
 
Registered: Nov 2019
Posts: 59

Rep: Reputation: Disabled
Cloned Identical HD's - How to know which is booted?


Dual Boot Win10 / Ubuntu 18.04.4 System has been running great. Added a M2 Nvme SSD and cloned it with the original installed SATA HD. I can read/write to both drives.
Grub shows the Windows 10 and Ubuntu on /dev/SDA/1 (SATA) as well as the Win 10 and Ubuntu on the /dev/Nvme. (Both are 1Tb drives).
How do I confirm Im actually booting to the nvme (even though I cursor down the Grub selections and select that option).
I haven't done the obvious "disconnect one and see if it still boots method yet and thought there would be an easier way.
How can i confirm I am booting to the nvme SSD and not the old SATA?
Thanks F

Last edited by Fairway; 02-21-2020 at 09:36 PM.
 
Old 02-21-2020, 09:37 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,346
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
I've never dealt with this, but what you've cloned is the content of the partitions, not the devices themselves.

Check the devices' UUID numbers. I don't know for sure, but I think there is a good chance that they will be different.

https://linuxx.info/how-to-find-uuid-of-disk-in-linux/

Let us know what you find.

Last edited by frankbell; 02-21-2020 at 09:41 PM.
 
Old 02-22-2020, 07:53 AM   #3
rinaldij
Member
 
Registered: May 2011
Location: Oklahoma
Distribution: Slackware64 current
Posts: 55

Rep: Reputation: 10
Won't the mount command tell you?

~# mount
/dev/sda1 on / type ext4 (rw,relatime)
.....
 
Old 02-22-2020, 09:20 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
in my grub menu it shows which distro is boot from where.
 
Old 02-22-2020, 10:28 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by Fairway View Post
Dual Boot Win10 / Ubuntu 18.04.4 System has been running great. Added a M2 Nvme SSD and cloned it with the original installed SATA HD. I can read/write to both drives.
Grub shows the Windows 10 and Ubuntu on /dev/SDA/1 (SATA) as well as the Win 10 and Ubuntu on the /dev/Nvme. (Both are 1Tb drives).
How do I confirm Im actually booting to the nvme (even though I cursor down the Grub selections and select that option).
I haven't done the obvious "disconnect one and see if it still boots method yet and thought there would be an easier way.
How can i confirm I am booting to the nvme SSD and not the old SATA?
Thanks F
I think the technical answers offered by others may give you an actual way to tell.

But ... why does it matter? You've made a clone.

Why did you make a clone? To change drive, to get a mirror backup? There also should be BIOS settings available to allow you to control which one you boot off of first, or also disallow you to boot off of one resource entirely.

But, if you just unplug each other, then you'll know that the clone will boot. (I feel that is the obvious and easier way)

"Right now" you do not need to copy data from one to the other at all. So there's no question about syncing data from A to B.

If your intentions are to switch from one to the other and use the original one for data, you could:
  • Confirm that the clone boots, by physical swap.
  • Put the original one only back in, but also live boot off of USB, modify the original so that it now would be a data only drive, no boot information, remove all partitions, create one or more data only partitions, type 83, make file system(s) for each partition.
  • Then go back to putting the clone into the system as the boot drive and also having the original one there as a data drive
The question though for me is, except to have a fresh drive, a newer one, considering that it is identical in size, why the need to clone it onto another drive?

Last edited by rtmistler; 02-22-2020 at 10:29 AM.
 
Old 02-22-2020, 05:11 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Allow me to demur.
Presuming bit-for-bit cloning actually happened - some people call rsyncíng a filesystem "cloning".
The root mount-point has nothing to do with how the machine booted. Even for the kernel, the mount takes place very late in the start-up process. When you reference filesystems/partitions by UUID, you cannot predict in advance which will be enumerated first. Although its likely the same will occur in future. That also means you could potentially boot off one and mount the other for filesystems.

One of several reasons not to do this - or at least remove one of the drives and toss it in a drawer for safe-keeping.
 
Old 02-22-2020, 09:21 PM   #7
Fairway
Member
 
Registered: Nov 2019
Posts: 59

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
in my grub menu it shows which distro is boot from where.
Read: How do I confirm Im actually booting to the nvme (even though I cursor down the Grub selections and select that option).
 
Old 02-22-2020, 09:36 PM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
one grub is not going to mislead you, but after you boot into your disto .. open gparted and look at what is mounted.

lsblk too can tell you
Code:
$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda            8:0    0   1.8T  0 disk 
└─sda1         8:1    0   1.8T  0 part /media/stores
mmcblk0      179:0    0  59.5G  0 disk 
└─mmcblk0p1  179:1    0  59.5G  0 part /media/userx/SDCardEXT4
nvme0n1      259:0    0   1.9T  0 disk 
├─nvme0n1p1  259:1    0    16M  0 part 
├─nvme0n1p2  259:2    0 113.1G  0 part 
├─nvme0n1p3  259:3    0  38.9G  0 part 
├─nvme0n1p4  259:4    0  68.1G  0 part 
├─nvme0n1p5  259:5    0   1.2T  0 part /media/data
├─nvme0n1p6  259:6    0  50.6G  0 part /
├─nvme0n1p7  259:7    0   347G  0 part /home
├─nvme0n1p8  259:8    0   100M  0 part /boot/efi
├─nvme0n1p9  259:9    0   200M  0 part 
├─nvme0n1p10 259:10   0    15G  0 part 
├─nvme0n1p11 259:11   0   3.6G  0 part 
└─nvme0n1p12 259:12   0  85.8G  0 part
grub.cfg menu entry
Code:
### BEGIN /etc/grub.d/30_os-prober ###

menuentry 'Slackware 14.2 x86_64 (post 14.2 -current) (on /dev/nvme0n1p3)' -
you can make a 40_custom menuentry to make sure you boot into that partition by giving it a special name ( over kill) but it is an option.

Last edited by BW-userx; 02-22-2020 at 09:45 PM.
 
Old 02-22-2020, 09:48 PM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by Fairway View Post
Read: How do I confirm Im actually booting to the nvme (even though I cursor down the Grub selections and select that option).
I don't know of any way to determine from what source the bootloader fetched the kernel and initrd into memory. The kernel only sees what is in memory, and it could all have arrived there by magic as far as the kernel is concerned. You can see what filesystems end up being mounted, but that's about all you can determine. I occasionally connect an external cloned disk to my laptop a little too early in the boot sequence and end up with a partition on that external disk mounted on /boot. I know full well that the external boot partition wasn't the boot source, since it wasn't even connected at the time the kernel was being loaded.

Running a system with duplicate UUIDs present is not advisable.
 
Old 02-22-2020, 09:56 PM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
oh you got a change your UUIDs.. you can even boot into one, and you should know which partitions you used to put stuff, if not figure that part out.

you can either use old school /dev/nvme0n1p10 / to mount in fstab until you get situated. or using sudo blkid to get your UUID then swapping them out in your fstab . maybe even boot a live usb and fix them before you boot into your system again. no chroot required to modify your on board fstab, just root permissions to write to the file when you save it.

making sure you get the right system the correct new UUIDs that is where knowing what/which partitions you put your newly cloned system on comes into play.

you just need to bust open 2 (maybe 3) terminals and use one for editing your fstab and other to get your UUID's and the 3rd to (maybe) see whats what, or just to look cool because it looks cool to have more than one terminal open at a time.

save reboot and if everything goes as planned, you're in like flint, and bobs your uncle.

Last edited by BW-userx; 02-22-2020 at 10:03 PM.
 
Old 02-22-2020, 10:32 PM   #11
Fairway
Member
 
Registered: Nov 2019
Posts: 59

Original Poster
Rep: Reputation: Disabled
Quote:
why does it matter?
Why did you make a clone?
To change drive, to get a mirror backup?
There also should be BIOS settings available to allow you to control which one you boot off of first, or also disallow you to boot off of one resource entirely.
But, if you just unplug each other, then you'll know that the clone will boot.
To confirm booting to and running the OS and software on a new SSD drive that is 6 Billion faster than the old spinning SATA
I cloned to exactly duplicate an existing solid functioning dual boot system and its installed software onto a new much faster drive.
I have selected both devices in BIOS to boot from and still could not validate which drive was booted after restart.
I know I can unplug a drive to determine - I stated that. I didn't want to disassemble the laptop if can determine via system/software etc.
Also dual boot yes windows.... With GRUB in selecting Ubuntu on dev/SDA1 or Ubuntu on dev/nvme I could not determine which physical disk was booting.
In GRUB and selecting either Win10 it seemed to boot to dev/sda1 regardless of my Win10 (SDA or nvme) GRUB selection. I boot to dev/SDA1 Win10, download a file to C\Downloads (SDA), copy that file to E\Downloads (nvme) and rename it. Reboot to dev/nvme Win10 and look in C\Downloads and the original file is there (not the renamed file to /dev/nvme (its still on E\Downloads)). I searched the web a bit and it seems to be a conundrum. I ran Benchmark PC and it said SATA drive was the boot on both Win10 boot selections I made.
I disconnected the SATA. Im booting to the nvme. Win10 benchmark is much improved. Ubuntu is quick and boots in like 3 seconds.
FYI - HardInfo 0.6-alpha doesn't even show a physical disk other than the DVDRW.
Wow...as always tinkering has been fun and perplexing, The SSD is so much faster thnks for the response think i'll let the SSD and my brain burn in for a few days!. FF

Last edited by Fairway; 02-22-2020 at 10:38 PM.
 
Old 02-22-2020, 10:51 PM   #12
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
To see which partitions of which drives you've actually mounted at boot:

Code:
:# mount -l
For example on my system at this moment:

Code:
root@ericsbane07/home/vtel57:# mount -l 
/dev/sda1 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda2 on /home type ext4 (rw)
/dev/sda3 on /home/vtel57/vtel57_storage type ext4 (rw)
/dev/sdc2 on /home/vtel57/vtel57_common type vfat (rw,fmask=111,dmask=000)
gvfsd-fuse on /home/vtel57/.gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=vtel57)
Notice I have four partitions mounted on two separate hard drives in the example above (highlighted in RED). /dev/sda1 is my /(root) partition. /dev/sda2 is my /home partition. /dev/sda3 is a storage partition. /sdc2 is a vfat common partition accessible from Linux or Windows.
 
Old 02-22-2020, 10:58 PM   #13
Fairway
Member
 
Registered: Nov 2019
Posts: 59

Original Poster
Rep: Reputation: Disabled
Code:
mount -l
root@ubuntu-HP-Laptop-17-by0xxx:/home/ubuntu# mount -l
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=8112752k,nr_inodes=2028188,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=1627420k,mode=755)
/dev/nvme0n1p5 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=706)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/var/lib/snapd/snaps/core_8689.snap on /snap/core/8689 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-logs_81.snap on /snap/gnome-logs/81 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-characters_375.snap on /snap/gnome-characters/375 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_116.snap on /snap/gnome-3-28-1804/116 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_8268.snap on /snap/core/8268 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_1668.snap on /snap/core18/1668 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-logs_61.snap on /snap/gnome-logs/61 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-system-monitor_123.snap on /snap/gnome-system-monitor/123 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-system-monitor_127.snap on /snap/gnome-system-monitor/127 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-characters_399.snap on /snap/gnome-characters/399 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_1650.snap on /snap/core18/1650 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1353.snap on /snap/gtk-common-themes/1353 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_110.snap on /snap/gnome-3-28-1804/110 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-calculator_406.snap on /snap/gnome-calculator/406 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-calculator_544.snap on /snap/gnome-calculator/544 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1440.snap on /snap/gtk-common-themes/1440 type squashfs (ro,nodev,relatime,x-gdu.hide)
/dev/nvme0n1p2 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1627416k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
 
Old 02-22-2020, 11:07 PM   #14
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
In that posting above, these are your currently mounted partitions:

/dev/nvme0n1p5 on / type ext4

/dev/nvme0n1p2 on /boot/efi type vfat

These are two partitions on the same solid state drive "nvme01".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] which lines are identical in the two files torito Linux - Newbie 5 06-02-2016 10:08 AM
autofs local map files identical but not identical to automount jwaldram Linux - Server 2 10-26-2012 10:35 AM
Which distro has been most successful when dual booted Windows 7 on an HP 3105m netbo MARogue Linux - Newbie 7 10-10-2011 07:45 AM
How do i know the linux kernel is booted off the disk of a cd ? vthegde Linux - Kernel 2 10-09-2009 01:11 AM
Identical disks that are not identical staphanes Linux - Hardware 8 03-11-2006 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration