LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   migrate /boot to new partition (https://www.linuxquestions.org/questions/linux-newbie-8/migrate-boot-to-new-partition-4175607515/)

slowerogue 06-08-2017 01:58 AM

migrate /boot to new partition
 
Hi,
I just installed a vm RHEL5, where /dev/sda1 is mounted as /
and the boot is just a directory under / ,not a partition.

I tried to move /boot to a new partition: /dev/sda2 but failed.
basically what i did was
  • fdisk /dev/sda, create sda2, mkfs sda2, assign bootable flag to sda2
  • mount /dev/sda2 /boot2/
  • rsync /boot/ /boot2/
  • grub
  • root (hd0,1)
  • setup (hd0,1)
  • edit grub.conf to (hd0,1)
  • edit fstab to auto mount sda2

the error message was error 15 file not found.

i found out even though i grub-install successfully, but when i type
grub
find /boot/grub/stage1

the result is (hd0,0)

may i know how do i install/change the stage1 to become (hd0,1)

Thanks

slowerogue 06-08-2017 04:57 AM

while booting ,
error 15: file not found.

I press e to edit the kernel parameter from
/boot/vmlinuz-blah-blah
/boot/initrd-blah-blah

to

(hd0,1)/vmlinuz-blah-blah
(hd0,1)/initrd-blah-blah

and it works

meaning the /boot is still not pointing to sda2

Thanks in advance

syg00 06-08-2017 05:35 AM

setup (hd0) <<<<<<======
You need to update the boot record in the MBR, not the partition.

slowerogue 06-08-2017 11:27 PM

Quote:

Originally Posted by syg00 (Post 5720425)
setup (hd0) <<<<<<======
You need to update the boot record in the MBR, not the partition.

Hi , i have tried that, still the same issue.
I have installed a new vm, with
sda1 , boot partition
sda2,VG, root partition.

I use the same steps to migrate sda1 to sda3 boot partition
it works

However for current issue, i was not able to migrate /boot(without partition) to a new partition.

Any idea?

Thanks again.


All times are GMT -5. The time now is 08:42 AM.