Slackware This Forum is for the discussion of Slackware Linux.
|
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-19-2006, 11:39 PM
|
#1
|
Member
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496
Rep:
|
resize_reiserfs worked...now what?
Hi all,
So I resized an 80gb reiserfs Slackware install to 35gb, in preparation for dual booting. The problem is, now what do I do so the damn thing boots back up? 
I tried using cfdisk to put the partition to 35gb (of course it seemed unable to get exactly on 35gb, I assume it's something with the cylinder size and all). If I write the modified cfdisk, Slackware doesn't boot back up (doesn't recognize the partition).
Right now I have the partition scheme still as 80gb Slackware (but only 35gb is being used, since as I said the resized worked).
Do I need to put cfdisk back to a 35gb / 45gb partition, and then maybe do mkinitrd or re-run lilo or something? The documentation I could find was rather...sparse.
|
|
|
04-20-2006, 01:53 AM
|
#2
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Rep: 
|
What did you do, exactly? I mean is the slackware now in the upper or the lower "reaches" (e.g.is it /dev/hda2 or /dev/hda1 ?). I case it is /dev/hda>=2 you'll have to reinstall the boot loader...
|
|
|
04-20-2006, 04:54 AM
|
#3
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Quote:
Originally Posted by Vgui
Hi all,
So I resized an 80gb reiserfs Slackware install to 35gb, in preparation for dual booting. The problem is, now what do I do so the damn thing boots back up? 
I tried using cfdisk to put the partition to 35gb (of course it seemed unable to get exactly on 35gb, I assume it's something with the cylinder size and all). If I write the modified cfdisk, Slackware doesn't boot back up (doesn't recognize the partition).
Right now I have the partition scheme still as 80gb Slackware (but only 35gb is being used, since as I said the resized worked).
Do I need to put cfdisk back to a 35gb / 45gb partition, and then maybe do mkinitrd or re-run lilo or something? The documentation I could find was rather...sparse.
|
If I understand correctly that you "resized" an 80GB Reiserfs filesystem using cfdisk, no wonder it won't boot. You can't use cfdisk to resize filesystems, it only resizes DOS partitions. So the only thing you did was to corrupt your filesystem.
The proper way to resize a filesystem is to back it up, repartition, make a new filesystem in the new partition, and restore into it. There are some other tools which can combine operations (like qtparted/parted) but it's easy on ext2/ext3/Reiserfs just to do like I said.
If you did that properly, I think you would not need to reinstall Lilo, as long as you didn't change the partition number.
|
|
|
04-20-2006, 05:00 AM
|
#4
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Rep: 
|
Quote:
Originally Posted by Randux
...If you did that properly, I think you would not need to reinstall Lilo, as long as you didn't change the partition number.
|
Seconded and agreed  .
Last edited by JZL240I-U; 04-20-2006 at 05:09 AM.
|
|
|
04-20-2006, 11:43 AM
|
#5
|
Member
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279
Rep:
|
You just might be able to restore things by editing the partition table by hand. I saw this done once, matching the actual end of partition markers in the filesystem with the incorrect ones in the partition table. A facinating demo to say the least!
Dennisk
|
|
|
04-20-2006, 05:17 PM
|
#6
|
Member
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496
Original Poster
Rep:
|
Alright, it seems my explanation was terrible.  Let's try it again...
I had:
/dev/hda1 80gb Slackware reiserfs
/dev/hda5 1gb swap (logical partition)
/dev/hda6 500mb tmp (logical partition)
I used resize_reiserfs to make:
/dev/hda1 35gb Slackware reiserfs
~45gb free space
/dev/hda5 1gb swap (logical partition)
/dev/hda6 500mb tmp (logical partition)
cfdisk is current setup to the first one. This means that the partition size of /dev/hda1 is set as 80gb, but the file system is actually only 35gb.
If I try to change cfdisk to be:
/dev/hda1 35gb
/dev/hda2 45gb
...
Then Slackware no longer boots.
So, the filesystem resized fine, and is 35gb now, but I don't know what to use to get the partition table to recognize this correctly.
Hopefully that was more clear...
|
|
|
04-21-2006, 02:32 AM
|
#7
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Rep: 
|
Ahm, revisit here.
To make it more clear, how did you make sure, that there were no files in the upper 45GB you subsequently cut off?
I, too, suggest the use of parted/qparted which do this right, including the moving of files if necessary (AFAIR)...
Last edited by JZL240I-U; 04-21-2006 at 02:37 AM.
|
|
|
04-21-2006, 03:54 AM
|
#8
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Yes, it's very difficult to know exactly where the cutoff is, because a gigabyte is a lot of storage. It's a lot smarter to calculate how many cylinders you need in terms of a gigabyte and map the partitions that way. The safe thing to do is to get a pencil and calculator and determine how to round to the next highest cylinder boundary.
If you are saying that when you use cfdisk to make /dev/hda1 80G the system will boot, and when you make it 35G it won't boot, that is better news. Find the next highest cylinder after the 35G limit and use cfdisk to set the cylinder boundary. Don't use gigabytes when you modify the partition table, unless you are starting with a clean disk. When you are resizing filesystems, it's too big of a number and you have no idea where it is on the disk.
I think this whole setup is not optimal, because you can wind up with partitions out of physical order. That isn't really a problem, but it is a little sloppy. It's better to tar everything, completely rework the partition table, make new filesystems, and and then lay things down neatly, contiguously.
Last edited by Randux; 04-21-2006 at 03:57 AM.
|
|
|
04-21-2006, 11:05 PM
|
#9
|
Member
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496
Original Poster
Rep:
|
Thanks for the help Randux, the situation is as you said (boots at 80gb, not at 35gb). I think I'll try mucking around at the cylinder level (time for some fdisk) and see how that goes. Worse comes to worse I'll just backup /home and reformat / repartition from scratch.
And I do know that this is not the ideal way to change the partition table, but I wanted to learn the resize_reiserfs command, and this is a relatively new install of Slackware on a secondary computer, so I thought it would be a good opportunity.
Sorry it took so long for me to be clear, and thanks all for the help.
|
|
|
04-22-2006, 02:58 PM
|
#10
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
No problem. I hope you can get it working soon.
|
|
|
All times are GMT -5. The time now is 11:47 AM.
|
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
|
|