NavigationUser loginWho's onlineThere are currently 1 user and 15 guests online.
Online users
Highest Users
Linux NewsClick the above for your daily dose of Linux news. Food for ThoughtNot a nut or bolt shall reach Chile under Allende. Once Allende comes to power we shall do all within our power to condemn Chile and all Chileans to utmost deprivation and poverty. Spam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
Newbie help how to enlarge root partitionI'm the guy that recently dd'd hda (40GB) to hdb (160GB) and then put the I tried using a Knoppix live CD and QtParted, but I still couldn't figure I've looked at fdisk and parted, but I need help. Do I need to start over Thanks - My current partitions are shown below. - John # fdisk /dev/hda The number of cylinders for this disk is set to 19457. Command (m for help): p Disk /dev/hda: 160.0 GB, 160041885696 bytes Device Boot Start End Blocks Id System Command (m for help): |
Newbie help how to enlarge root partition
John Fleming wrote:
> I'm the guy that recently dd'd hda (40GB) to hdb (160GB) and then put
> the larger drive in the first position, making it now the new hda. I
> knew I would then be using only 40GB of the 160GB HDD. I thought it
> would be easy to enlarge the 40GB root partition, but this newbie is
> having trouble with that.
>
> I tried using a Knoppix live CD and QtParted, but I still couldn't
> figure out to do it - When the root partition was selected, "resize" was
> not even an option (dimmed out).
>
> I've looked at fdisk and parted, but I need help. Do I need to start
> over copying my 40GB HDD to a properly-partitioned 160GB HDD, or can
> someone give me detailed instructions to expand my 40GB root partition
> to use the available free space on the new drive?
>
> Thanks - My current partitions are shown below. - John
> Debian Sarge
>
>
> # fdisk /dev/hda
>
> The number of cylinders for this disk is set to 19457.
> There is nothing wrong with that, but this is larger than 1024,
> and could in certain setups cause problems with:
> 1) software that runs at boot time (e.g., old versions of LILO)
> 2) booting and partitioning software from other OSs
> (e.g., DOS FDISK, OS/2 FDISK)
>
> Command (m for help): p
>
> Disk /dev/hda: 160.0 GB, 160041885696 bytes
> 255 heads, 63 sectors/track, 19457 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hda1 * 1 4801 38564001 83 Linux
> /dev/hda2 4802 4863 498015 f W95 Ext'd (LBA)
> /dev/hda5 4802 4863 497983+ 82 Linux swap /
> Solaris
>
> Command (m for help):
Well, the space you want to enlarge /dev/hda1 into is already taken up
by hda2 and hda5.
In order to enlarge hda1 you'd have to remove hda2. Start knoppix with
the swap=off (? check the help pages if this is correct) option, delete
hda2, enlarge hda1 and then recreate your swap again.
HTH,
Johannes
--
Newbie help how to enlarge root partition
There is no root partition. There is a root account but if memory serves
is located in the "/" partition. So if that's correct, it's the slash
partition you want to enlarge.
--
Newbie help how to enlarge root partition
[This message has also been posted to linux.debian.user.]
"John Fleming" wrote:
> I've looked at fdisk and parted, but I need help. Do I need to start
> over copying my 40GB HDD to a properly-partitioned 160GB HDD, or can
> someone give me detailed instructions to expand my 40GB root
> partition to use the available free space on the new drive?
> Disk /dev/hda: 160.0 GB, 160041885696 bytes
> 255 heads, 63 sectors/track, 19457 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hda1 * 1 4801 38564001 83 Linux
> /dev/hda2 4802 4863 498015 f W95 Ext'd
> (LBA) /dev/hda5 4802 4863 497983+ 82 Linux
> swap / Solaris
The question, as posed, makes no sense. Do you have a 40 GB
drive and you're considering buying a 160GB drive?
Or do you already have a 160 GB drive? If it's the
latter, what's the other 120 GB being used for?
I'm going to GUESS the remaining 120 GB is a Windows-95
partition you don't want any more, but you just forgot
to include it when you copied the fdisk listing.
Maybe the unmentioned 120 GB partition is /dev/hda6.
If that's the case, the easiest thing to do is make
a new file system on the 120 GB partition and move
your /var and /home directories there. The partition where
/ and /usr are is quite large enough. Again, I'm GUESSING
because you didn't state the problem clearly, but I've
never needed more than 16 GB for /usr (well, not counting
/usr/src on a development machine), so I think you
can leave that where it is. Please read the manpages
for each of the following commands and understand what
they do. Read the fstab manpage too.
The bash manpage explains what && and >> do.
Log in as root on a console. Your X Window System
session may not survive this operation, and you
do not want it interrupted in the middle.
One more caution. Newbies for some reason seem to not
notice spaces in commands. Spaces matter. Don't
leave them out. Don't put in extra ones any old
place. If there are no spaces after a minus or
around an equals sign, it's on purpose.
If there are spaces after the name of a command,
or between arguments to a command, you need them.
telinit 1 # stop deamons that write logs
cd /
du -s *
mke2fs -L overflow -j -c /dev/hda6
mkdir hda6
mount -t ext3 -L overflow /hda6
cp -a home var hda6
mv home home.old && ln -s hda6/home home
mv var var.old && ln -s hda6/var var
echo LABEL=overflow /hda6 ext3 defaults 0 2 >> /etc/fstab
rm -rf home.old var.old
Now you've copied /var and /home to the big partition.
You might want to postpone the rm -rf until after a
reboot, to be sure you don't need the originals (*.old)
any more.
Notice "overflow" could have been on a second drive.
Now please read Eric Raymond's famous essay
"How to Ask Questions the Smart Way." Google for it.
Don't ask "how do I enlarge a partition" when that's
not the real problem. Allow for other solutions by
stating the actual problem, not suggesting the first
solution you can think of. "I installed my whole
system in one partition and it's filling up.
What should I do?"
Cameron
--