How to move boot partition to the front ?
When I try to boot my HDD, it shows me an grub error 18. I googled and figured out that, this error is displayed when the disk is larger than than what BIOS can handle.
The solution to this is to either update the BIOS or move the boot partition to the front. I cannot update the BIOS because this is a proprietary BIOS. The best option for me is to move the boot partition to the front. But I am pretty new to linux in this matter. Can anyone please explain me from the scratch on how to do move the boot partition to the front?
I found this link useful:
I am using RHEL 5 and the grub.conf has two kernels in it.
What does it mean by moving the boot partition to the front ?
I would appreciate your help. Thanks in advance.
It ain't that easy - especially without any info. Post the output (say from a liveCD) from "/sbin/fdisk -l" (that's a lower case ell, as in list)
You might need to be root.
Back up the data and re-create the partition, so the partition that stores /boot is in the front or is created first. Then restore the data from the back ups. You could use gpartd, but it is not safe and not predictable. If you are using Windows, GRUB can be install in the root of C in its own directory of course.
Every motherboard uses proprietary BIOS unless the motherboard manufacture is part of OpenBIOS.
Hey, thanks for the super fast replies...Actually, I don't have the disk with me. As soon as I get it, I'll post the output of disk -l and post it !!! But I have a query here...
The HDD boots perfectly on P4 and 915 motherboard. So, is it ok if i boot the HDD on that motherboard and then post the output of disk -l ?
Btw..I have not installed Windows on the disk. I only have RHEL 5 on my HDD.
D'oh - command was wrong; amended above.
Get the list however you can - any machine is fine so long as we know which disk.
Is this LVM by any chance ???.
yea, I was wondering, if it was disk or fdisk !!
I think, in order to move boot to the front
1) I need to back up the HDD
2) Delete everything
3) Create partitions
4) Copy some files to the desired partition
If I am right, I would like to know which files and folders to copy and to which partition, after deleting all the partitions on that disk and creating the partitions again !!
Actually, one of the guys is already doing it here as he knows that !! But I want to do that myself.
I would like to try it on my notebook. I have windows XP on my notebook. I have installed VMWare on the machine. Now, I want to freshly install Linux OS on it and make sure that the boot partition is in the front !!
How do I do that ?:scratch:
What I do is create a primary partition for /boot first, after that its just a matter of taste.
Most (all ???) distros will build /boot properly if you mount it during install - if not, just copy the entire /boot over and update fstab to point to the new partition.
Hey syg00, Thanks for the reply...
I actually did that but that also din't help me either..Initially, The disk I was using was 160 gigs. And I created two partitions: /boot and swap
I kept only 10 gigs for /boot and 1 gigs for swap. I kept rest of the space free....But I got the same error 18.
Then, I took an 80 gb disk and then installed RHEL 5 with two partitions: / and swap and it worked fine for me.
Now, in order to run one application and configure it, I needed to recompile the kernel. So, I recompiled the kernel an built it again (make modules, make bzImage, make modules_install and make install)
When I rebooted my computer and selected the newly built kernel, it said that the selected cylinder exceeds the maximum supported by BIOS(error 18)..This is again the same grub error I mentioned in my first post.
But if I boot the old kernel(default one, which comes with distro), then it boots fine....
What can I do to run the newly built kernel ? Do I need to delete some files ? I think the size seems to be a problem...I have few softwares and stuff in /home directory. Will it help if I delete these files so that the image of newly built kernel comes under the newly supported cylinders of BIOS ?
Creating a 10 GB partition for /boot is a waste. I create a /boot partition that is between 16 to 40 MB. Even with 16 MB, I could store several kernel and initrd files.
To minimize any problems, try to stay under 1024 cylinder mark for the partition that will store /boot. If you are going over, you may have to upgrade grub and/or include lba32 in /boot/grube/menu.lst file.
In the BIOS, it is best to set the hard drive geometry to LBA, but only set this when valuable data is not stored on the hard drive.
Oh....I am a little bit new to this stuff....I am expecting a detail explanation...I hope you dont mind...So, here is what I understand from your reply:
There are two possibilities to bring the boot partition to the front
1) while installing the OS at the very beginning
2) After you have installed the OS without /boot partition
1) When installing the OS, make three partitions:
a) /boot (about 20 mbs)
b) / (about 10 gigs)
c) swap (around twice the RAM size..in my case 1 gigs as I have 512 RAM on my system)
If the above partitions are correct, then would the initrd, vmlinuz and grub files be put automatically to /boot partition or do I need to do that manually after OS is installed and ready ?
1) how do I include lba32 in menu.lst file ? Its the same as grub.conf file
2) How do I set the HDD geometry to LBA...
I don't have anything important on my HDD, but its a pain to reinstall the OS and recompile the kernel...takes so much time...anyways, I would do that if there is no way out...or whatever you think is the best solution...
Thanks..waiting for the reply..
I think you should re-install. You really need that separate /boot partition, and you need to allocate it first to be sure.
The Fedora install will simply put everything it needs in /boot. Make sure you select the separate partition for the /boot mountpoint during the install, and everything will be fine. If you are going to use a partition that small for /boot, format it as ext2.
LBA is set in the BIOS, and may not help. If you are doing a full re-install, set it if it is an option in the BIOS. As for grub, the version that ships with RHEL5 should be fine - personally I'd leave it alone.
To redo the partitions when Linux is already installed and setup properly.
1) Use another hard drive that is equal or larger than the present drive.
2) Use a LIVE Linux CD/DVD distribution such as Knoppix
3) In Knoppix go to run level 3 (skips GUI)
4) Mount each partition the same way the present installation does. Look in to /etc/fstab file for the present installation for hints, but not knppix's /etc/fstab file.
5) Mount the second hard drive. Of course the second hard drive have to be format to some filesystem like EXT3, JFS, or XFS.
6) Use the cp -a command to copy from the source to the destination.
7) After copying is done, use cfdisk to delete all partitions and create them.
8) Use hdparm -z to re-scan the partition table
9) Format each partition.
10) Mount the partitions and create the directories to represent the new setup.
11) Copy files from the second hard drive to the first hard drive.
There are a lot of steps, but it is good practice.
A re-installation of Linux can be done. In Redhat or other GUI installers, make sure you pick expert mode so you can create the desire partitions in the front, any size, and any filesystem. I recommend do not pick ReiserFS as the filesytem because it is not reliable and stable. XFS and JFS are better alternatives than EXT3, but should not be used when the computer has memory less than 512 MB.
Yes, /boot/grub/menu.lst is grub.conf. /boot/grub/grub.conf is just a symbolic link that points to menu.lst which is the correct file.
The journal for EXT2 does not take a lot of up space. I use EXT3 for 16 MB. I recommend stick with journal filesystems unless the mediums are removable. Journal filesystems saves a lot of grief when something goes wrong.
I suggest go to http://rute.2038bug.com/.
How many files get updated on /boot that would benefit from a journal ???.
menu.lst ... maybe ... How often ???.
I've always preferred to have the space - I'm surprised by your comment about the 16 Meg partition.
Quick test on a 32 Meg partition showed about a Meg difference immediately after the formats (ext2/3).
Maybe you're right - not worth worrying about.
@ankit4u1 - use journalled filesystems everywhere (ext3 in this case).
So, should I keep 16 or 32 Megs /boot partition ?
I actually changed the BIOS chip with the new version and it is booting the larger HDD(160 gb). I, then tried making three partitions:
1) /boot (I actually tried with 100 mb)
2) / (About 155 gigs)
3) swap (about 4.9 gigs, although I don't need that much)
But this gave me one error. It said that, not enough space in / partition...What does that mean? The root has 155 gigs.....I din't try out all the probabilities and combinations....like /boot = 16 megs /boot=32 megs...etc...I finally kept two partitions /root= 156 gigs and swap=4 gigs approx
I have another HDD, on which I need to install RHEL 5. After I get your reply, I would try the /boot partition.
The maximum size per swap partition is around 2 GB. If you want 4 GB of swap, you have to make either four swap partitions that are 1 GB or two 2 GB swap partitions.
Be careful, / and /root may seem to the same to you but they are two different directories. The / is for all directories under it. For /root, it is for the user 'root' or the administrator account.
Creating a 155 GB partition for / that is formated as EXT3 will lose about 5% for root related services, so you will actually get 147 GB for yourself.
Again I use EXT3 for /boot. Then I use XFS for / and /home on systems with 512 MB of RAM or more. The speed advantage of XFS versus EXT3 is about five times. Though for a novice user, stick with EXT3 because it is very reliable and stable. If you see ReiserFS, avoid it like the plague.
Partition type for EXT3 is 0x83 or 83. This is for other Linux filesystems unless stated by the filesystem developer. Partition type 82 is for Linux swap partitions. In Disk Druid, the type of partition is already done behind the scenes, but it does ask you if want to create primary partition. Usually /boot partitions are primary.
|All times are GMT -5. The time now is 02:38 AM.|