View previous topic :: View next topic |
Author |
Message |
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Fri Oct 06, 2017 2:53 pm Post subject: [Solved]Problem post clonig root partition |
|
|
HI all, I've cloned my gentoo from sdb2 to sdb1, I've changed boot flags, I've lauched grub-mkconfig but gentoo start always from sdb2. I noticed that sdb1 and sdb2 have the same UUID
Code: | ┌─[root@hptoo] - [/home/martoo] - [2017-10-06 11:36:30]
└─[0] <> blkid
/dev/sdb2: UUID="254cbe70-ff7d-47e4-9a6a-e6a771ba66eb" TYPE="ext4" PARTUUID="565613c9-02"
/dev/sda1: LABEL="SYSTEM" UUID="D224-521F" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="06a19107-706c-4700-8087-1d6a2a5334ff"
/dev/sda6: UUID="1d596c35-2e8d-4796-9a19-83770e497450" TYPE="swap" PARTUUID="69cc3fed-50ec-4be0-a39e-fc7971ce0ef3"
/dev/sda7: UUID="5849d6b6-3410-41d1-a1ec-a3cb9f78a9e8" TYPE="ext4" PARTUUID="aa40d595-9255-4085-b481-7071fe3cb20e"
/dev/sdb1: UUID="254cbe70-ff7d-47e4-9a6a-e6a771ba66eb" TYPE="ext4" PARTUUID="565613c9-01" |
then I've modified fstab with /dev/sd* instead that UUID
This is my grub.cfg
Code: |
(chroot) root@hptoo $ cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
else
search --no-floppy --fs-uuid --set=root 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=it_IT
insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-254cbe70-ff7d-47e4-9a6a-e6a771ba66eb' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
else
search --no-floppy --fs-uuid --set=root 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
fi
echo 'Loading Linux x86_64-4.12.12-gentoo ...'
linux /boot/kernel-genkernel-x86_64-4.12.12-gentoo root=UUID=254cbe70-ff7d-47e4-9a6a-e6a771ba66eb ro
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-4.12.12-gentoo
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-254cbe70-ff7d-47e4-9a6a-e6a771ba66eb' {
menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.12.12-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.12.12-gentoo-advanced-254cbe70-ff7d-47e4-9a6a-e6a771ba66eb' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
else
search --no-floppy --fs-uuid --set=root 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
fi
echo 'Loading Linux x86_64-4.12.12-gentoo ...'
linux /boot/kernel-genkernel-x86_64-4.12.12-gentoo root=UUID=254cbe70-ff7d-47e4-9a6a-e6a771ba66eb ro
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-4.12.12-gentoo
}
menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.12.12-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.12.12-gentoo-recovery-254cbe70-ff7d-47e4-9a6a-e6a771ba66eb' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
else
search --no-floppy --fs-uuid --set=root 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
fi
echo 'Loading Linux x86_64-4.12.12-gentoo ...'
linux /boot/kernel-genkernel-x86_64-4.12.12-gentoo root=UUID=254cbe70-ff7d-47e4-9a6a-e6a771ba66eb ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-4.12.12-gentoo
}
menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.12.5-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.12.5-gentoo-advanced-254cbe70-ff7d-47e4-9a6a-e6a771ba66eb' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
else
search --no-floppy --fs-uuid --set=root 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
fi
echo 'Loading Linux x86_64-4.12.5-gentoo ...'
linux /boot/kernel-genkernel-x86_64-4.12.5-gentoo root=UUID=254cbe70-ff7d-47e4-9a6a-e6a771ba66eb ro
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-4.12.5-gentoo
}
menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.12.5-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.12.5-gentoo-recovery-254cbe70-ff7d-47e4-9a6a-e6a771ba66eb' {
load_video
if [ "x$grub_platform" = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
else
search --no-floppy --fs-uuid --set=root 254cbe70-ff7d-47e4-9a6a-e6a771ba66eb
fi
echo 'Loading Linux x86_64-4.12.5-gentoo ...'
linux /boot/kernel-genkernel-x86_64-4.12.5-gentoo root=UUID=254cbe70-ff7d-47e4-9a6a-e6a771ba66eb ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-genkernel-x86_64-4.12.5-gentoo
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
|
This is my partition table
Code: | Disk /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
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: 14832E2C-71A4-47A1-B244-9F757880B7BA
Device Start End Sectors Size Type
/dev/sda1 2048 739327 737280 360M EFI System
/dev/sda2 739328 1001471 262144 128M Microsoft reserved
/dev/sda3 1001472 489213951 488212480 232,8G Microsoft basic data
/dev/sda4 1922813952 1924820991 2007040 980M Windows recovery environment
/dev/sda5 1924820992 1953523711 28702720 13,7G Microsoft basic data
/dev/sda6 489213952 505620479 16406528 7,8G Linux swap
/dev/sda7 505620480 1217050623 711430144 339,2G Linux filesystem
/dev/sda8 1217050624 1217460223 409600 200M EFI System
/dev/sda9 1217460224 1915402231 697942008 332,8G FreeBSD UFS
/dev/sda10 1915402232 1922813951 7411720 3,5G FreeBSD swap
Partition table entries are not in disk order.
Disk /dev/sdb: 223,6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x565613c9
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 207871999 207869952 99,1G 83 Linux
/dev/sdb2 251660288 468860927 217200640 103,6G 83 Linux
|
Last edited by zar Marco on Mon Oct 09, 2017 9:12 am; edited 1 time in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Fri Oct 06, 2017 6:48 pm Post subject: |
|
|
Hi, sda8 is a partition created by freebsd installer. But the system works, I don't think this is the problem, or am I wrong? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Fri Oct 06, 2017 7:00 pm Post subject: |
|
|
https://bbs.archlinux.org/viewtopic.php?id=215541 provides info on changing PARTUUID and UUID
Having two partitions with the same PARTUUID and PARTLABEL which each contain filesystems with the same UUID is not a good idea. _________________ Defund the FCC. |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Fri Oct 06, 2017 7:51 pm Post subject: |
|
|
Ok thanks, I've change fstab from UUID to /dev/sd*, is it OK or I do others change? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Fri Oct 06, 2017 8:18 pm Post subject: |
|
|
Still recommend making new UUID for filesystem and PARTUUID for filesystem/partition /dev/sdb1 or /dev/sdb2. grub does not much care about fstab. _________________ Defund the FCC. |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Fri Oct 06, 2017 8:49 pm Post subject: |
|
|
Thanks, Then I do new PARTUUID and I relunch grub-mkconfig? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Fri Oct 06, 2017 9:19 pm Post subject: |
|
|
I would create both a new UUID and a new PARTUUID and then update/edit grub.cfg _________________ Defund the FCC. |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Fri Oct 06, 2017 9:31 pm Post subject: |
|
|
Thanks, Monday I'm trying |
|
Back to top |
|
|
zar Marco Guru
Joined: 09 Sep 2016 Posts: 445 Location: Colle Umberto ( TV )
|
Posted: Mon Oct 09, 2017 9:12 am Post subject: |
|
|
Thanks, I've solved with change UUID on sdb1 and relaunch grub-mkconfig |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|