LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-19-2006, 11:39 PM   #1
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
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.
 
Old 04-20-2006, 01:53 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639

Rep: Reputation: Disabled
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...
 
Old 04-20-2006, 04:54 AM   #3
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
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.
 
Old 04-20-2006, 05:00 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639

Rep: Reputation: Disabled
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.
 
Old 04-20-2006, 11:43 AM   #5
dennisk
Member
 
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279

Rep: Reputation: 30
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
 
Old 04-20-2006, 05:17 PM   #6
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Original Poster
Rep: Reputation: 31
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...
 
Old 04-21-2006, 02:32 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639

Rep: Reputation: Disabled
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.
 
Old 04-21-2006, 03:54 AM   #8
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
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.
 
Old 04-21-2006, 11:05 PM   #9
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Original Poster
Rep: Reputation: 31
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.
 
Old 04-22-2006, 02:58 PM   #10
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
No problem. I hope you can get it working soon.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
resize_reiserfs failure kpachopoulos Linux - General 4 02-09-2006 11:31 AM
9.3 worked... but now it doesn't? Agizor SUSE / openSUSE 11 04-26-2005 04:52 PM
using resize_reiserfs hamish Linux - General 0 06-10-2004 03:52 PM
resize_reiserfs question celeron2002 Linux - Software 1 02-23-2004 01:09 PM
This worked in RH 7.0, but NG in 8.0? gco10996 Linux - General 5 11-04-2002 02:30 PM

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

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