LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-24-2009, 07:31 AM   #1
AndyD236
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Rep: Reputation: 0
Partitioning issue


I have a Ubuntu Server 9.10 system up and running. The system is currently partitioned as /boot, /, /swap and the rest is LVM. The /boot and / is ext4. The customer wants /boot to be under / (for restore reasons). does anyone know of the best way to do this without relading or losing data?

Thanks
 
Old 11-24-2009, 08:28 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
In principle:
Assume that sda1 is mounted at /boot, and sda2 at /:

Code:
umount /dev/sda1
mkdir /mnt/oldboot
mount /dev/sda1 /mnt/oldboot
cd /mnt/olbboot
cp -R * /boot

remove the sda1 entry in /etc/fstab
edit /boot/grub/menu.lst  (entries beginning with "/" must be changed to begin with "/boot/"
I'm pretty sure this can be done on a running system, but I have never done it. To be safe, do it (with appropriate changes) from a live CD.
 
Old 11-30-2009, 08:47 AM   #3
oshunluvr
LQ Newbie
 
Registered: Jan 2005
Location: long beach, ca
Distribution: Kubuntu "Jaunty" 9.04 x86_64
Posts: 19

Rep: Reputation: 2
slight typo there - the cd command should be

cd /mnt/oldboot

the difference being the previous post has "olbboot".

Ya never know when someone will cut-n-paste!
 
Old 11-30-2009, 08:55 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Could you double check that the LVM isn't used as the root partition? Perhaps post your /etc/fstab file.
A logical partition in the LVM volume might be used for root (/), and if that is the case, you may not be able to boot after moving it to a directory in the LVM.
 
Old 11-30-2009, 09:38 AM   #5
AndyD236
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Original Poster
Rep: Reputation: 0
....

I have this working, more details here: http://www.linuxquestions.org/questi...nu.1st-771955/

However, there is still something I don't understand. The system boots fine and /boot is mounting under /dev/sda2. Here's the strange part. /dev/sda1 is not being mounted, if I mount it and remove the old /boot directory, unmount it, and reboot, the system does not boot, and says grub: file not found. Apparently somewhere during boot it is still looking at /dev/sda1 for soemthing, even though it is not being mounted. Any ideas?
 
Old 11-30-2009, 10:12 AM   #6
oshunluvr
LQ Newbie
 
Registered: Jan 2005
Location: long beach, ca
Distribution: Kubuntu "Jaunty" 9.04 x86_64
Posts: 19

Rep: Reputation: 2
If you're using 9.10 , you're using GRUB PC or GRUB2. Try running update-grub with /dev/sda1 not mounted.
 
Old 11-30-2009, 01:17 PM   #7
AndyD236
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Original Poster
Rep: Reputation: 0
....

This is grub2. I did run update-grub without /dev/sda1 mounted and itt updated grub.cfg correctly (e.g. root=(hd0,2)

The only thing I can think is that it has something to do with the MBR
 
Old 11-30-2009, 03:13 PM   #8
oshunluvr
LQ Newbie
 
Registered: Jan 2005
Location: long beach, ca
Distribution: Kubuntu "Jaunty" 9.04 x86_64
Posts: 19

Rep: Reputation: 2
Have you tried grub-install???

Did you upgrade to 9.10 or clean install???

Could be MBR has some left-overs...???
 
  


Reply



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
Partitioning issue tech_paul Linux - Newbie 9 04-19-2009 10:13 PM
Partitioning issue lawlonslawt Linux - Newbie 9 03-28-2009 09:59 PM
Suse 10.1 partitioning issue duped SUSE / openSUSE 1 09-26-2006 10:19 AM
Partitioning issue lp449 Linux - Newbie 1 07-09-2005 08:52 PM
Putting off the partitioning issue oneandoneis2 Linux - General 3 02-03-2004 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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