Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
Due to network maintenance being performed by our provider, LQ will be down starting at 05:01 AM UTC. The exact duration of the downtime isn't currently known. We apologize for the inconvenience.
|
 |
10-24-2011, 03:30 AM
|
#1
|
|
Member
Registered: Jul 2006
Location: Belgrade, Serbia
Distribution: Debian
Posts: 571
Rep:
|
Grub2, moving /boot to separate partition
I would like to move /boot from sda4 (where / is) to sda1.
how to do that with Grub2 on Debian Testing?
thanks.
|
|
|
|
10-24-2011, 05:08 AM
|
#2
|
|
LQ Veteran
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
|
The easiest would be with a live cd and as root from terminal
mount partition sda1 with /mnt/sda1
and run command
grub-install --boot-directory=/mnt/sda1 /mnt/sda
|
|
|
1 members found this post helpful.
|
10-24-2011, 05:40 AM
|
#3
|
|
Member
Registered: Jul 2006
Location: Belgrade, Serbia
Distribution: Debian
Posts: 571
Original Poster
Rep:
|
thanks.
hm, but why would I need to do it from live CD?
can't it be done from sda4?
|
|
|
|
10-24-2011, 06:49 AM
|
#4
|
|
LQ Veteran
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
|
Here is a good tutorial that I refer to that will explain both ways.
grub2
Last edited by Larry Webb; 10-24-2011 at 06:53 AM.
|
|
|
|
10-24-2011, 01:01 PM
|
#5
|
|
Member
Registered: Jul 2006
Location: Belgrade, Serbia
Distribution: Debian
Posts: 571
Original Poster
Rep:
|
well I failed. forgot to modify /boot/grub/grub.cfg
I found an interesting tutorial here for old grub: http://tekguru.wordpress.com/2007/09...own-partition/
if I simply modify the grub.cfg like he did menu.lst , would it work?
|
|
|
|
10-24-2011, 02:25 PM
|
#6
|
|
LQ Veteran
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
|
Yes but if you run update-grub it will change grub.cfg back plus any changes in distros that you have made. When I install grub2 to a separate partition I make my own grub.cfg and then disable os-prober. One easy way is to copy your grub.cfg from the installed linux distro and paste it in your new /boot/grub partition.
I chainload my partitions so I find it easier to build my own grub.cfg.
|
|
|
|
10-25-2011, 01:23 AM
|
#7
|
|
Member
Registered: Jul 2006
Location: Belgrade, Serbia
Distribution: Debian
Posts: 571
Original Poster
Rep:
|
hm, could update-grub automagically find sda1 partition (that has only /boot on it) and add it to grub.cfg ?
I don't understand how the system knows where / is after the commands from /boot finish.
does single menu item in grub.cfg contain both locations of /boot and / ?
|
|
|
|
10-25-2011, 02:28 AM
|
#8
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,225
|
No, the code "knows" where it was installed from - based on the parameters passed to (or defaulted) the grub-install.
After doing the grub-install from the "old" configuration you need to update fstab for the new /boot, reboot or remount /boot to sda1, then (re-)run the update-grub. Things should then all be pointing in the correct direction(s).
|
|
|
1 members found this post helpful.
|
10-25-2011, 11:33 AM
|
#9
|
|
Member
Registered: Jul 2006
Location: Belgrade, Serbia
Distribution: Debian
Posts: 571
Original Poster
Rep:
|
it seems I used grub-install on wrong partition.
in the end, I followed chroot method and it works.
edit: funny thing is now I have /boot/boot/grub
perhaps that was the problem.
Last edited by qrange; 10-25-2011 at 11:44 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:28 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|