LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-10-2013, 02:14 PM   #1
DavidDiepUSC
Member
 
Registered: Jan 2008
Posts: 58

Rep: Reputation: 0
What is the best way to move /boot to /?


Hi Linux gurus,

When I initially installed RHEL6, I had /boot on its own partition. Now I want to move it to another partition, which is occupied by /.

I want to have /boot under the / directory. What is the best way to do this... I want to avoid installing it all over again. That would be a shame.


Thanks!
 
Old 05-10-2013, 03:15 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,564

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
Figure out first how to reconfigure your boot loader, whatever that is. Then, maybe something like this as root?

Quote:
umount /boot
mkdir /mnt/tmp
mount <boot's partition> /mnt/tmp
cp -a /mnt/tmp/* /boot/ && sync

Then reconfigure your boot loader and /etc/fstab. The line for /boot is no longer needed, unless you're mounting it somewhere else.
 
Old 05-10-2013, 05:22 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
just "moving" data in /boot partition to a folfer on /
will still leave you a /boot partition that you are not using and is taking up one of the primary partitions

Also if / is a LVM and NOT ext3
or
if /is ext4
you will NOT be able to move GRUB-legacy on RHEL6.4
The legacy grub needs ext2 or ext3
and on a primary partition
 
Old 05-10-2013, 07:29 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Quote:
Originally Posted by John VV View Post
The legacy grub needs ext2 or ext3
and on a primary partition
Not true.
The issue with ext4 was that the increased inode size wasn't handled in legacy grub. However this also applied to any ext3 filesystem created post the roll-out of ext4 support in e2fsprogs. The major distros patched grub to accommodated this.
There has never been requirement for a primary partition - that only applies to Windows loaders, although some (old) BIOS also demand a boot flag be set on a primary partition. But that is a different issue again.
 
Old 05-13-2013, 08:55 AM   #5
DavidDiepUSC
Member
 
Registered: Jan 2008
Posts: 58

Original Poster
Rep: Reputation: 0
Thanks for the input everyone.

The / is not a LVM it is ext4, so is /boot.

So the question is, how to reconfigure the bootloader. I'm running my system off a IBM Z machine, I believe the bootloader is /etc/zipl.conf... it doesn't really make any reference to what partition the /boot is on, so think there wouldn't be any need for a modification:

Code:
[defaultboot]
timeout=5
default=linux-2.6.32-220.el6.s390x
target=/boot/
[linux-2.6.32-220.el6.s390x]
        image=/boot/vmlinuz-2.6.32-220.el6.s390x
        ramdisk=/boot/initramfs-2.6.32-220.el6.s390x.img
        parameters="root=/dev/disk/by-path/ccw-0.0.0101-part1 rd_NO_LUKS rd_DASD=0.0.0301 rd_DASD=0.0.0300 rd_NO_MD  KEYTABLE=us SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_DASD=0.0.0103 rd_DASD=0.0.0101 rd_NO_LVM rd_NO_DM LANG=en_US.UTF-8"
I do see a need to modify the fstab:

Code:
#
# /etc/fstab
# Created by anaconda on Wed May  8 13:32:47 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/disk/by-path/ccw-0.0.0101-part1 /                       ext4    defaults        1 1
/dev/disk/by-path/ccw-0.0.0100-part1 /boot                   ext4    defaults        1 2
 
  


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] Move boot sector schuurs Linux - Hardware 6 01-14-2011 07:12 AM
move /boot to USB tkh23 Linux - General 3 09-21-2009 11:49 AM
Move boot partition/Backup hazmatt20 Linux - General 5 01-09-2006 03:16 AM
Mandrake Move Network Boot AcerKev Mandriva 0 01-14-2005 12:25 PM
Help with Grub: move it to /boot linda Slackware 14 11-01-2004 08:29 PM


All times are GMT -5. The time now is 08:30 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration