Change PTTYPE and UUID of an fdisk created partition Unicorn Meta Zoo #1: Why another...
With indentation set to `0em`, when using a line break, there is still an indentation of a size of a space
Can you stand up from being prone using Skirmisher outside of your turn?
Did the Roman Empire have penal colonies?
How to open locks without disable device?
What is the term for a person whose job is to place products on shelves in stores?
My admission is revoked after accepting the admission offer
Rolling Stones Sway guitar solo chord function
Will I lose my paid in full property
Can I criticise the more senior developers around me for not writing clean code?
How to get even lighting when using flash for group photos near wall?
Why did Israel vote against lifting the American embargo on Cuba?
Is Bran literally the world's memory?
Could moose/elk survive in the Amazon forest?
Why isn't everyone flabbergasted about Bran's "gift"?
Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network?
What ability score does a Hexblade's Pact Weapon use for attack and damage when wielded by another character?
A faster way to compute the largest prime factor
Why does the Cisco show run command not show the full version, while the show version command does?
What is this word supposed to be?
All ASCII characters with a given bit count
Passing args from the bash script to the function in the script
What to do with someone that cheated their way through university and a PhD program?
Are there moral objections to a life motivated purely by money? How to sway a person from this lifestyle?
Why do games have consumables?
Change PTTYPE and UUID of an fdisk created partition
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionMoving /usr to its own filesystem/logical volumeTransfer 2 drive raid0 / lvm2 system to new drive pairCentos missing ext3.koExpanding root partition CentOS 6 With using fdiskHow do I add /home to arch with uuid if I messed up while installing?Xen domU not resizing diskHow to extend logical & extended partition with fdiskExtend partition using LVMMounting root partition on embedded file systemSlackware64 14.2 - GRUB2 - How set default <UUID> instead <DEVICE>?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I've got two systems. On one, I decided to try and increase the virtual disk /dev/sda. So I delete the partition using fdisk and recreate it with a larger end size but identical start location. ( Initially, I make the mistake of creating the partition as an extended one then revert to making it a primary one. ) I also ensure the type (id) is set to 8e ( Linux LVM ).
I write the new partition to disk, reboot and run into a boot issue.
And now the disk won't mount. So I try to recreate the initramfs using the following:
Recovery Option 3 (shell):
vgscan -v --mknodes
vgchange -a y
mkdir /mnt/root
mount /dev/mapper/centos-root /mnt/root
mount -o bind /dev /mnt/root/dev
mount -o bind /sys /mnt/root/sys
mount -o bind /proc /mnt/root/proc
mount /dev/sda1 /mnt/root/boot
chroot /mnt/root
cd /boot
dracut -f
grub2-mkconfig -o /boot/grub2/grub.cfg
but that has no effect. Then I notice the following from the same VM recovery console:
sh-4.2# blkid /dev/sda2
/dev/sda2: PTTYPE="dos"
sh-4.2#
whereas on the first good VM that boots fine ( both are clones of the same template ) I see the following:
# blkid /dev/sda2
/dev/sda2: UUID="owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc" TYPE="LVM2_member"
So based on the error that it can't find centos-root at boot time, I began to suspect it's because /dev/sda2 is set to PTTYPE="dos" rather then TYPE="LVM2_member" instead:
But how do I change this on /dev/sda2? I tried:
tune2fs /dev/sda2 -U random
returns "Bad magic number in super-block while trying to open /dev/sda2" and "Couldn't find valid filesystem superblock."
Googling for this hasn't proven fruitfull. Using the search string "change partition type LVM2_member" yields fdisk pages showing how to change the partition type in fdisk, which I already did above.
Searching for "change UUID" results in tune2fs commands that won't work on the fdisk partition and will yield the above error. Searching for "PTTYPE" yields only pages with blkid output.
Would anyone be able to share how to change the TYPE and UUID of the /dev/sda2 partition once fdisk creates it?
Perhaps I should be using another command instead? All this would have to be done from the recovery console.
Detailed blkid output of the good disk:
[root@sys01 ~]# blkid -po udev /dev/sda2
ID_FS_UUID=owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc
ID_FS_UUID_ENC=owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc
ID_FS_VERSION=LVM2x20001
ID_FS_TYPE=LVM2_member
ID_FS_USAGE=raid
ID_PART_ENTRY_SCHEME=dos
ID_PART_ENTRY_TYPE=0x8e
ID_PART_ENTRY_NUMBER=2
ID_PART_ENTRY_OFFSET=1026048
ID_PART_ENTRY_SIZE=133191680
ID_PART_ENTRY_DISK=8:0
[root@sys01 ~]#
blkid of the bad disk ( host sys02 ):
sh-4.2# blkid -po udev /dev/sda2
ID_PART_TABLE_TYPE=dos
ID_PART_TABLE_SCHEME=dos
ID_PART_ENTRY_TYPE=0x8e
ID_PART_ENTRY_NUMBER=2
ID_PART_ENTRY_OFFSET=1026048
ID_PART_ENTRY_SIZE=133191680
ID_PART_ENTRY_DISK=8:0
sh-4.2#
Thx,
TK
Posted this earlier but I suppose I had the wrong forum over at StackExchange -> Superuser?
partition lvm uuid
New contributor
add a comment |
I've got two systems. On one, I decided to try and increase the virtual disk /dev/sda. So I delete the partition using fdisk and recreate it with a larger end size but identical start location. ( Initially, I make the mistake of creating the partition as an extended one then revert to making it a primary one. ) I also ensure the type (id) is set to 8e ( Linux LVM ).
I write the new partition to disk, reboot and run into a boot issue.
And now the disk won't mount. So I try to recreate the initramfs using the following:
Recovery Option 3 (shell):
vgscan -v --mknodes
vgchange -a y
mkdir /mnt/root
mount /dev/mapper/centos-root /mnt/root
mount -o bind /dev /mnt/root/dev
mount -o bind /sys /mnt/root/sys
mount -o bind /proc /mnt/root/proc
mount /dev/sda1 /mnt/root/boot
chroot /mnt/root
cd /boot
dracut -f
grub2-mkconfig -o /boot/grub2/grub.cfg
but that has no effect. Then I notice the following from the same VM recovery console:
sh-4.2# blkid /dev/sda2
/dev/sda2: PTTYPE="dos"
sh-4.2#
whereas on the first good VM that boots fine ( both are clones of the same template ) I see the following:
# blkid /dev/sda2
/dev/sda2: UUID="owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc" TYPE="LVM2_member"
So based on the error that it can't find centos-root at boot time, I began to suspect it's because /dev/sda2 is set to PTTYPE="dos" rather then TYPE="LVM2_member" instead:
But how do I change this on /dev/sda2? I tried:
tune2fs /dev/sda2 -U random
returns "Bad magic number in super-block while trying to open /dev/sda2" and "Couldn't find valid filesystem superblock."
Googling for this hasn't proven fruitfull. Using the search string "change partition type LVM2_member" yields fdisk pages showing how to change the partition type in fdisk, which I already did above.
Searching for "change UUID" results in tune2fs commands that won't work on the fdisk partition and will yield the above error. Searching for "PTTYPE" yields only pages with blkid output.
Would anyone be able to share how to change the TYPE and UUID of the /dev/sda2 partition once fdisk creates it?
Perhaps I should be using another command instead? All this would have to be done from the recovery console.
Detailed blkid output of the good disk:
[root@sys01 ~]# blkid -po udev /dev/sda2
ID_FS_UUID=owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc
ID_FS_UUID_ENC=owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc
ID_FS_VERSION=LVM2x20001
ID_FS_TYPE=LVM2_member
ID_FS_USAGE=raid
ID_PART_ENTRY_SCHEME=dos
ID_PART_ENTRY_TYPE=0x8e
ID_PART_ENTRY_NUMBER=2
ID_PART_ENTRY_OFFSET=1026048
ID_PART_ENTRY_SIZE=133191680
ID_PART_ENTRY_DISK=8:0
[root@sys01 ~]#
blkid of the bad disk ( host sys02 ):
sh-4.2# blkid -po udev /dev/sda2
ID_PART_TABLE_TYPE=dos
ID_PART_TABLE_SCHEME=dos
ID_PART_ENTRY_TYPE=0x8e
ID_PART_ENTRY_NUMBER=2
ID_PART_ENTRY_OFFSET=1026048
ID_PART_ENTRY_SIZE=133191680
ID_PART_ENTRY_DISK=8:0
sh-4.2#
Thx,
TK
Posted this earlier but I suppose I had the wrong forum over at StackExchange -> Superuser?
partition lvm uuid
New contributor
add a comment |
I've got two systems. On one, I decided to try and increase the virtual disk /dev/sda. So I delete the partition using fdisk and recreate it with a larger end size but identical start location. ( Initially, I make the mistake of creating the partition as an extended one then revert to making it a primary one. ) I also ensure the type (id) is set to 8e ( Linux LVM ).
I write the new partition to disk, reboot and run into a boot issue.
And now the disk won't mount. So I try to recreate the initramfs using the following:
Recovery Option 3 (shell):
vgscan -v --mknodes
vgchange -a y
mkdir /mnt/root
mount /dev/mapper/centos-root /mnt/root
mount -o bind /dev /mnt/root/dev
mount -o bind /sys /mnt/root/sys
mount -o bind /proc /mnt/root/proc
mount /dev/sda1 /mnt/root/boot
chroot /mnt/root
cd /boot
dracut -f
grub2-mkconfig -o /boot/grub2/grub.cfg
but that has no effect. Then I notice the following from the same VM recovery console:
sh-4.2# blkid /dev/sda2
/dev/sda2: PTTYPE="dos"
sh-4.2#
whereas on the first good VM that boots fine ( both are clones of the same template ) I see the following:
# blkid /dev/sda2
/dev/sda2: UUID="owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc" TYPE="LVM2_member"
So based on the error that it can't find centos-root at boot time, I began to suspect it's because /dev/sda2 is set to PTTYPE="dos" rather then TYPE="LVM2_member" instead:
But how do I change this on /dev/sda2? I tried:
tune2fs /dev/sda2 -U random
returns "Bad magic number in super-block while trying to open /dev/sda2" and "Couldn't find valid filesystem superblock."
Googling for this hasn't proven fruitfull. Using the search string "change partition type LVM2_member" yields fdisk pages showing how to change the partition type in fdisk, which I already did above.
Searching for "change UUID" results in tune2fs commands that won't work on the fdisk partition and will yield the above error. Searching for "PTTYPE" yields only pages with blkid output.
Would anyone be able to share how to change the TYPE and UUID of the /dev/sda2 partition once fdisk creates it?
Perhaps I should be using another command instead? All this would have to be done from the recovery console.
Detailed blkid output of the good disk:
[root@sys01 ~]# blkid -po udev /dev/sda2
ID_FS_UUID=owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc
ID_FS_UUID_ENC=owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc
ID_FS_VERSION=LVM2x20001
ID_FS_TYPE=LVM2_member
ID_FS_USAGE=raid
ID_PART_ENTRY_SCHEME=dos
ID_PART_ENTRY_TYPE=0x8e
ID_PART_ENTRY_NUMBER=2
ID_PART_ENTRY_OFFSET=1026048
ID_PART_ENTRY_SIZE=133191680
ID_PART_ENTRY_DISK=8:0
[root@sys01 ~]#
blkid of the bad disk ( host sys02 ):
sh-4.2# blkid -po udev /dev/sda2
ID_PART_TABLE_TYPE=dos
ID_PART_TABLE_SCHEME=dos
ID_PART_ENTRY_TYPE=0x8e
ID_PART_ENTRY_NUMBER=2
ID_PART_ENTRY_OFFSET=1026048
ID_PART_ENTRY_SIZE=133191680
ID_PART_ENTRY_DISK=8:0
sh-4.2#
Thx,
TK
Posted this earlier but I suppose I had the wrong forum over at StackExchange -> Superuser?
partition lvm uuid
New contributor
I've got two systems. On one, I decided to try and increase the virtual disk /dev/sda. So I delete the partition using fdisk and recreate it with a larger end size but identical start location. ( Initially, I make the mistake of creating the partition as an extended one then revert to making it a primary one. ) I also ensure the type (id) is set to 8e ( Linux LVM ).
I write the new partition to disk, reboot and run into a boot issue.
And now the disk won't mount. So I try to recreate the initramfs using the following:
Recovery Option 3 (shell):
vgscan -v --mknodes
vgchange -a y
mkdir /mnt/root
mount /dev/mapper/centos-root /mnt/root
mount -o bind /dev /mnt/root/dev
mount -o bind /sys /mnt/root/sys
mount -o bind /proc /mnt/root/proc
mount /dev/sda1 /mnt/root/boot
chroot /mnt/root
cd /boot
dracut -f
grub2-mkconfig -o /boot/grub2/grub.cfg
but that has no effect. Then I notice the following from the same VM recovery console:
sh-4.2# blkid /dev/sda2
/dev/sda2: PTTYPE="dos"
sh-4.2#
whereas on the first good VM that boots fine ( both are clones of the same template ) I see the following:
# blkid /dev/sda2
/dev/sda2: UUID="owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc" TYPE="LVM2_member"
So based on the error that it can't find centos-root at boot time, I began to suspect it's because /dev/sda2 is set to PTTYPE="dos" rather then TYPE="LVM2_member" instead:
But how do I change this on /dev/sda2? I tried:
tune2fs /dev/sda2 -U random
returns "Bad magic number in super-block while trying to open /dev/sda2" and "Couldn't find valid filesystem superblock."
Googling for this hasn't proven fruitfull. Using the search string "change partition type LVM2_member" yields fdisk pages showing how to change the partition type in fdisk, which I already did above.
Searching for "change UUID" results in tune2fs commands that won't work on the fdisk partition and will yield the above error. Searching for "PTTYPE" yields only pages with blkid output.
Would anyone be able to share how to change the TYPE and UUID of the /dev/sda2 partition once fdisk creates it?
Perhaps I should be using another command instead? All this would have to be done from the recovery console.
Detailed blkid output of the good disk:
[root@sys01 ~]# blkid -po udev /dev/sda2
ID_FS_UUID=owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc
ID_FS_UUID_ENC=owcjYz-ohz3-3obA-KaL0-wcyn-ayc5-EG1Fgc
ID_FS_VERSION=LVM2x20001
ID_FS_TYPE=LVM2_member
ID_FS_USAGE=raid
ID_PART_ENTRY_SCHEME=dos
ID_PART_ENTRY_TYPE=0x8e
ID_PART_ENTRY_NUMBER=2
ID_PART_ENTRY_OFFSET=1026048
ID_PART_ENTRY_SIZE=133191680
ID_PART_ENTRY_DISK=8:0
[root@sys01 ~]#
blkid of the bad disk ( host sys02 ):
sh-4.2# blkid -po udev /dev/sda2
ID_PART_TABLE_TYPE=dos
ID_PART_TABLE_SCHEME=dos
ID_PART_ENTRY_TYPE=0x8e
ID_PART_ENTRY_NUMBER=2
ID_PART_ENTRY_OFFSET=1026048
ID_PART_ENTRY_SIZE=133191680
ID_PART_ENTRY_DISK=8:0
sh-4.2#
Thx,
TK
Posted this earlier but I suppose I had the wrong forum over at StackExchange -> Superuser?
partition lvm uuid
partition lvm uuid
New contributor
New contributor
New contributor
asked 1 hour ago
Tom KTom K
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Tom K is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f515379%2fchange-pttype-and-uuid-of-an-fdisk-created-partition%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Tom K is a new contributor. Be nice, and check out our Code of Conduct.
Tom K is a new contributor. Be nice, and check out our Code of Conduct.
Tom K is a new contributor. Be nice, and check out our Code of Conduct.
Tom K is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f515379%2fchange-pttype-and-uuid-of-an-fdisk-created-partition%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown