LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2017, 01:58 AM   #1
slowerogue
Member
 
Registered: Oct 2012
Posts: 96

Rep: Reputation: Disabled
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
 
Old 06-08-2017, 04:57 AM   #2
slowerogue
Member
 
Registered: Oct 2012
Posts: 96

Original Poster
Rep: Reputation: Disabled
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
 
Old 06-08-2017, 05:35 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,719

Rep: Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550
setup (hd0) <<<<<<======
You need to update the boot record in the MBR, not the partition.
 
Old 06-08-2017, 11:27 PM   #4
slowerogue
Member
 
Registered: Oct 2012
Posts: 96

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Migrate Mint 17.3 from HDD partition to SSD johnniedoo Linux - Newbie 40 05-22-2016 04:48 PM
migrate a partition using dump and restore cccc *BSD 2 04-08-2012 05:52 PM
Migrate OS partition t a new SAN Salibt Linux - Server 3 11-11-2011 08:39 AM
migrate to another partition jdtiede Linux - Hardware 2 02-07-2008 11:50 AM
Migrate Directory to Separate Disk Partition Neapolitan Red Hat 1 01-18-2006 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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