LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Making the /boot partition bigger (https://www.linuxquestions.org/questions/linux-newbie-8/making-the-boot-partition-bigger-203491/)

r3dhatter 07-10-2004 04:01 PM

Making the /boot partition bigger
 
Is there a stable/easy way to make my boot partition bigger, or better yet, merge it with my root partition. I like to install the latest kernels and don't delete the last ones for a while. I was wondering if I could make the boot partition bigger for this reason.


I was thinking about using Qtparted, but I am not sure if anything will get messed up after using it.


Thanks

Tinkster 07-10-2004 04:10 PM

How big is it currently? Maybe you just want to change
the filesystem :}

That aside it's quite easy to move /boot to / ...

Just go init 1 and then
a) copy the files from boot to /tmp/boot
b) unmount /boot
c) edit /etc/fstab, remove the /boot-line
d) copy files from /tmp/boot back to /boot

Done ... caveat: you have a tiny, empty partition :)


Cheers,
Tink

r3dhatter 07-10-2004 04:17 PM

Thanks for the imput. Very helpful.

What did you mean by changing the filesystem? It is ext 3, and it is ~100megs.

If I were to do it the way you suggested, how would I get rid of the empty partition? (or add that space to the root partition)

Tinkster 07-10-2004 04:18 PM

There's your problem :)

ext3's journaling.

You shouldn't use ext3 for small paritions,
change back to ext2 and you'll fit another
20 kernels there ;)


Cheers,
Tink

r3dhatter 07-10-2004 04:29 PM

Cool, although, just wondering..how do I change it to ext 2 from ext 3 without reformatting?

r3dhatter 07-10-2004 05:08 PM

bump. Would qtparted do it right? I am sure there is another way, but not sure what it is..

and using ext 3 for my root partition is ok, right?

@Tinkster - I noticed you are using debian for work. Are you using Stable, Testing, or Unstable?


Thanks

p-static 07-10-2004 05:50 PM

To change it from ext3 to ext2, you'll have to back up all the files from the /boot partition, then "mke2fs /boot", and then copy all the files back. I don't think there's a way to do it without reformatting, but I could be wrong.

r3dhatter 07-10-2004 06:33 PM

I did a little research and I found a few threads that say to do this:

"You use tune2fs to change the file systems either to or from ext2 or ext3.
I suggest you use your install CD to load your system since I don't
believe you can make the change with the partition active.

Once you have a working system without the partition mounted that you want
to change you should issue this command:

tune2fs -O ^has_journal /dev/drive_partition

where drive partition is something like hda1. You will also need to
change /etc/fstab to make sure the partition the correct type.

To change it back just do the same but issue this command:

tune2fs -O has_journal /dev/drive_partition

Read the man page for tune2fs. "


From http://linux.derkeiler.com/Mailing-L...3-11/1271.html


Not sure if this is right or not though...

jschiwal 07-10-2004 07:23 PM

You could create a boot partition on your root (/) partition and mount it there, copying all of the files to your new directory, then either reformat the old boot as ext2 or use tune2fs. After that you can move the files back. This will be easier to do using the rescue system when the /boot partition isn't mounted to begin with.

r3dhatter 07-10-2004 08:00 PM

Do I even need a /boot partition? Can I just copy the /boot folder to the root partition and delete the /boot partition afterwards. Not sure how I would reset the boot flag though...

p-static 07-10-2004 09:10 PM

Tune2fs should work. You'll need to umount the /boot partition first, though. If you do choose to just copy the boot partition onto the root partition, make sure you update your grub.conf for the new locations. I think you can set the boot flag with fdisk.

r3dhatter 07-10-2004 09:41 PM

I think I really messed it up now. I copied /boot to /temp/boot, then I formatted my boot partition as ext 2 with qtparted. Then, went to the fstab and commented out my swap by accident (thought it was the partition qtparted made). I also commented out my boot partition. Now I can't load grub.

I thought about using knoppix to solve this just by copying and pasting /boot to the root partition but it says I do not have permission even though I use the super user mode gui thing. Help.

Thanks

vectordrake 07-10-2004 10:08 PM

You can likely use knoppix. If it has grub on it, which is quite likely, try to reinstall grub (who needs menu.lst?) Or, install grub to a floppy for this problem. If you have grub without a menu.lst (or grub.conf in gentoo-speak), you can still boot by entering the boot (hdx), kernel= lines. You can even install grub to your hard drive's partition again if you know where your kernel is - you can get the darn thing booted again anyhow.

r3dhatter 07-11-2004 03:08 PM

Thanks for the suggestion vectordrake. I have tried many ways to make linux boot disk that I found on google, but many have not worked for me.. I can still copy files from my old /boot partition onto a cd and floppy. I have a grub folder, lost and found, vmlinux, config files, initrd.img files, and system maps for 3 different kernels: 2.5, 2.4, and 2.6.6.

How do I make a boot disk from this? I would like to make it using a cdrom since it is really hard to make floppy boot disk do to the slowness of my floppy drive. I also have a debian sarge installer if that helps any.

Thanks

r3dhatter 07-11-2004 03:34 PM

Cool, I got linux to come up with a Libranet boot disk!

Although, I can't get into the gui, so I am going to have to copy the files using command line.

I did:
cp boot /
and:
cp --target-directory=/ boot

but it just says "ommiting directory 'boot' "

Is there another way to copy the boot folder (in /temp/boot) to root (/)

Thanks


All times are GMT -5. The time now is 01:18 AM.