LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 09-29-2019, 06:07 AM   #1
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Rep: Reputation: 0
Change Boot Drive


Hi folks.

Well, got a new drive in the box and I want to move my boot drive to this new SSD. My plan is not to move to a RAID after all.

I want to move from sdb -> sda. I've already rsync sdb sda properly and installed grub2 on sda. I pulled the sdb cable and I'm thinking the /etc/fstab is still showing sdb somehow, but it has a UUID instead of a volume. Here are some notes:

Code:
Model: ATA CT120BX500SSD1 (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  211MB   210MB   fat16        EFI System Partition  boot
 2      211MB   1285MB  1074MB  xfs
 3      1285MB  120GB   119GB                                      lvm


Model: ATA ADATA SP550 (scsi)
Disk /dev/sdb: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  211MB   210MB   fat16        EFI System Partition  boot
 2      211MB   1285MB  1074MB  xfs
 3      1285MB  120GB   119GB                                      lvm

...other disks...
Code:
# /etc/fstab
# Created by anaconda on Mon Sep 10 16:27:03 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=04fde641-f537-49b4-a617-451e4325c92c /boot                   xfs     defaults        0 0
UUID=3979-7E7E          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
/dev/mapper/centos-home /home                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0


# RF mods for /dev/sdb backup disk:
UUID=4fba19c4-01e1-4afd-b541-2682b80983cd /home/backups ext4 defaults 	0 0

/dev/sdd2			/full_backups		ext4	defaults	0	0
So it shows that a drive has the boot partition, but I'm not sure which one it is. Right now I'm assuming sdb is proper (the legacy OS I'm up on now) and sda has it but isn't happy with the /etc/fstab.

Any insight as to how this works? I feel I'm close but I thought I'd check with you Linux experts.

How can I move to sda as my primary drive and take sdb completely out?
 
Old 09-29-2019, 07:38 AM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
uuids will be different for partitions on sda will have to change in fstab and grub.cfg
post the output of
Code:
 blkid -o export

Last edited by colorpurple21859; 09-29-2019 at 07:46 AM.
 
Old 09-29-2019, 07:45 AM   #3
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
post the output of
Code:
 blkid -o export
Code:
DEVNAME=/dev/sda1
SEC_TYPE=msdos
UUID=3979-7E7E
TYPE=vfat
PARTLABEL=EFI System Partition
PARTUUID=784e407c-1353-4cb9-804f-8bbab648efaa

DEVNAME=/dev/sda2
UUID=04fde641-f537-49b4-a617-451e4325c92c
TYPE=xfs
PARTUUID=377559bf-224b-4130-b86a-4ecd6f445949

DEVNAME=/dev/sda3
UUID=8Lbt7c-V7Fw-XWyU-P9I8-pKWU-YtC1-n33MGE
TYPE=LVM2_member
PARTUUID=b275609a-7bed-4a92-9994-cfda7bf0a902

DEVNAME=/dev/sdd1
LABEL=EFI
UUID=67E3-17ED
TYPE=vfat
PARTLABEL=EFI System Partition
PARTUUID=06ee0c3f-125d-46c1-8d2b-a15430c411ae

DEVNAME=/dev/sdd2
UUID=1188b19c-6b58-4822-8321-c1118694bed3
TYPE=ext4
PARTLABEL=Windows_NTFS_Untitled_2
PARTUUID=186cea1d-4ada-4320-99de-97848abedc4d

DEVNAME=/dev/sdc
UUID=A2BpZd-Xx52-YFRs-6tns-pS66-z8wl-a56ehW
TYPE=LVM2_member

DEVNAME=/dev/sdb1
SEC_TYPE=msdos
UUID=3979-7E7E
TYPE=vfat
PARTLABEL=EFI System Partition
PARTUUID=784e407c-1353-4cb9-804f-8bbab648efaa

DEVNAME=/dev/sdb2
UUID=04fde641-f537-49b4-a617-451e4325c92c
TYPE=xfs
PARTUUID=377559bf-224b-4130-b86a-4ecd6f445949

DEVNAME=/dev/sdb3
UUID=8Lbt7c-V7Fw-XWyU-P9I8-pKWU-YtC1-n33MGE
TYPE=LVM2_member
PARTUUID=b275609a-7bed-4a92-9994-cfda7bf0a902

DEVNAME=/dev/mapper/centos-root
UUID=bde0e85d-4653-451c-a6a5-8222fc3825ee
TYPE=xfs

DEVNAME=/dev/mapper/centos-swap
UUID=33669fd2-6177-4f9e-a06c-e9c9d9270f2d
TYPE=swap

DEVNAME=/dev/sde1
UUID=2019-09-11-19-02-53-00
LABEL=CentOS 7 x86_64
TYPE=iso9660
PTTYPE=dos

DEVNAME=/dev/sde2
SEC_TYPE=msdos
LABEL=ANACONDA
UUID=79B1-8EA0
TYPE=vfat

DEVNAME=/dev/mapper/shadowneb-shadow_n
UUID=4fba19c4-01e1-4afd-b541-2682b80983cd
TYPE=ext4

DEVNAME=/dev/mapper/centos-home
UUID=0a7ca014-5aff-419d-b393-5e5cac26f182
TYPE=xfs
 
Old 09-29-2019, 08:35 AM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
both drives have same uuids for paritions. This is probably what is causing the confusion. Does the system boot when sdb is removed? If not and if boots in efi mode off of sdb maybe this will fix
Code:
efibootmgr --create --disk /dev/sda --part 1 --write-signature --loader /EFI/centos/grubx64.efi --label "centos1" --verbose
I changed the label to centos1 to keep down confusion in the bios boot order.

I have never dealt with this issue so really can't say how to fix, maybe someone will chime in that knows more about this.

Last edited by colorpurple21859; 09-29-2019 at 08:44 AM.
 
Old 09-29-2019, 08:50 AM   #5
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
both drives have same uuids for paritions. This is probably what is causing the confusion. Does the system boot when sdb is removed? If not and if boots in efi mode off of sdb maybe this will fix
Code:
efibootmgr --create --disk /dev/sda --part 1 --write-signature --loader /EFI/centos/grubx64.efi --label "centos1" --verbose
I changed the label to centos1 to keep down confusion in the bios boot order.

I have never dealt with this issue so really can't say how to fix, maybe someone will chime in that knows more about this.
It's a half boot. It requests root password to get into the shell, or ctrl-dto continue, which brings me back to the same warning asking for root pw.

Should I proceed with that instruction?
 
Old 09-29-2019, 09:00 AM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
should I proceed with that instruction?
no that won't fix it.
The problem is with either the grub.cfg, initramfs, or fstab. I suspect it is the initramfs but not sure.

Last edited by colorpurple21859; 09-29-2019 at 09:05 AM.
 
Old 09-29-2019, 09:07 AM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
maybe this will help if it is the initramfs
https://wiki.centos.org/TipsAndTricks/CreateNewInitrd
Maybe someone will chime in with more experience in this.

Last edited by colorpurple21859; 09-29-2019 at 09:10 AM.
 
Old 09-29-2019, 09:13 AM   #8
BeeRich
Member
 
Registered: Mar 2009
Location: Toronto, Canada
Distribution: CentOS7.something
Posts: 70

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
maybe this will help if it is the initramfs
https://wiki.centos.org/TipsAndTricks/CreateNewInitrd
Maybe someone will chime in with more experience in this.
Since I chose rsync, I can just replace the drive in the same location, shouldn't I?
 
Old 09-30-2019, 09:26 AM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
If this is an efi system, one problem I see is your efi partition on both drives are not flagged as esp. How did you make both drives with same uuids?

Last edited by colorpurple21859; 09-30-2019 at 11:18 AM.
 
  


Reply

Tags
boot issues, drives, fstab



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change boot options with Windows 8, to allow the optical drive to be first boot Davidicus Linux - Newbie 4 12-14-2012 07:13 PM
I want to copy my hard drive to a larger hard drive and boot from the new drive. lpmorgan1 Ubuntu 8 09-07-2009 11:26 PM
drive IDs change from boot to boot emtstephen Linux - Newbie 3 08-06-2008 09:49 PM
/boot/boot/boot/boot/boot/ muddywaters SUSE / openSUSE 1 09-10-2005 06:08 AM
How do I mount a boot drive on another boot drive timswim78 Linux - Hardware 2 03-27-2005 08:10 PM

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

All times are GMT -5. The time now is 09:39 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