You are not logged in.
Hi *
I'm trying to understand where I do mistake...
I want to migrate Arch running on MBR partitioned HDD to new GPT HDD.
What I do:
1.using gdisk I create GTP partitions on my new HDD like following:
gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.4
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sdb: 20971520 sectors, 10.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): B76025A4-B90F-4781-8754-0B0EBF699230
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 20971486
Partitions will be aligned on 8-sector boundaries
Total free space is 6 sectors (3.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF02 BIOS boot partition
2 409640 9625639 4.4 GiB 8300 Linux filesystem
3 9625640 18841639 4.4 GiB 8300 Linux filesystem
4 18841640 20971486 1.0 GiB 8300 Linux filesystem
2. Make ext3 part on 2nd partition on new HDD
3. Mount 2nd part and rsync current OS to this
4. Install grub on new HDD
grub-install /dev/sdb
5. Adjust /boot/grub/grub.cfg on new HDD for suitable kernel boot parameters, etc.
New, when I'm trying to boot OS from new HDD I'm receiving following error:
Welcome to GRUB!
error: no such device <UUID of old HDD boot partition>
Entering rescue mode
I make sure new grub.cfg hasn't any entries with old boot part UUID (ff6d81f8-e6ab-4d80-92b5-df70748629e1).
Only place on new HDD where I see it is /boot/grub/i386-pc/load.cfg
search.fs_uuid ff6d81f8-e6ab-4d80-92b5-df70748629e1 root hd0,msdos1
set prefix=($root)/boot/grub
Where is error in above procedure ?
BTW: I also tried to use grub install cmd line form Arch wiki
grub-install --target=i386-pc --recheck --debug /dev/sdb
Issue is the same :-(
Last edited by warped (2013-05-19 10:02:43)
Offline
grub-mkconfig -o /boot/grub/grub.cfg
and using this and reboot, help??
Well, I suppose that this is somekind of signature, no?
Offline
You have different guid's for the partitions, and you need to modify /etc/grub/grub.cfg accordingly (grub-mkconfig) and also /ets/fstab.
Offline
grub-mkconfig -o /boot/grub/grub.cfg
and using this and reboot, help??
Oh - it is obvious to generate new grub.cfg. I made it exactly as You mention.
Offline
You have different guid's for the partitions, and you need to modify /etc/grub/grub.cfg accordingly (grub-mkconfig) and also /ets/fstab.
I'm fully aware it this. I make sure new grub.conf hasn't any relation to old UUID. (also I disabled UUID usage in /etc/default/grub before issuing grub-mkconfig).
Also fstab is correctly adjusted (here I also use old school root id like /dev/sda2)
Here is my grub.conf.
cat /media/mirror.vol/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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
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
}
set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
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=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Production' {
load_video
set gfxpayload=keep
insmod gzio
insmod ext2
linux /boot/vmlinuz-linux root=/dev/sda1 ro vga=0x305 console=tty1 init=/bin/systemd
initrd /boot/initramfs-linux.img
}
menuentry 'GPT Production' {
load_video
set gfxpayload=keep
insmod gzio
insmod ext2
linux /boot/vmlinuz-linux root=/dev/sdb2 ro vga=0x305 console=tty1 init=/bin/systemd
initrd /boot/initramfs-linux.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###
### 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 ###
[root@mythtv ~]#
Offline
My bios-boot partition is 1007 KB,why is yours 200 MB?If it's 1 or 2 MB it would be OK but 200 MB is too much.
Offline
My bios-boot partition is 1007 KB,why is yours 200 MB?If it's 1 or 2 MB it would be OK but 200 MB is too much.
Right. For BIOS systems 1 or 2 MB is OK. However if in the future I will switch to UEFI system - this part will hold EFI drivers/firmware - and 2MB will be definitelly too smal.
Offline
I don't know about UEFI but bios-boot (ef02) is not the same as /boot (ext4 in my case when my disks were MBR).
Offline
Yeah. Issue solved.
GRUB needs to know where /boot/grub is located. So it either takes it
from mount point or I need to explicitly tell where it is using
grub-install --boot-directory=/boot_alt ...
br
Offline