PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > resize the partition with /
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

resize the partition with /

Réponse
 
LinkBack Outils de la discussion
Vieux 30/09/2007, 21h20   #1
Manu Hack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut resize the partition with /

Hi all,

I have a problem with an old desktop running etch. Before it was
running XP + etch dual boot. But recently I have deleted the whole XP
partition. Now the problem is I started running out of space for the
etch. I want to resize the partition so that I can install more
programs and stuff like that. The current partition is like

hda1 - 5G (before running XP)
hda2 - 1G ( etch is living here)

So I'd like to resize hda2 but I can't as it said I need to unmount
hda2 before resizing. People suggest using a live CD but it's not
possible with my old laptop (I didn't even install etch using CD, I
can only install etch via goodbyemicrosoft.com). USB boot is also not
available.

Any suggestion would be welcome. What I want to do is to be able to
apt-get upgrade stuff as right now I have only <5Mb of space in hda2.

Thanks a lot!

Manu


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 30/09/2007, 21h40   #2
Amit Uttamchandani
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /


You might want to try the gparted live CD (http://gparted.sourceforge.net/livecd.php). Boot from it and resize partitions on the fly.

Good Luck.

--
Amit Uttamchandani <atu13439@csun.edu>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 30/09/2007, 22h30   #3
Marc Shapiro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

Douglas A. Tutty wrote:
> On Sun, Sep 30, 2007 at 04:17:42PM -0400, Manu Hack wrote:
>
>> I have a problem with an old desktop running etch. Before it was
>> running XP + etch dual boot. But recently I have deleted the whole XP
>> partition. Now the problem is I started running out of space for the
>> etch. I want to resize the partition so that I can install more
>> programs and stuff like that. The current partition is like
>>
>> hda1 - 5G (before running XP)
>> hda2 - 1G ( etch is living here)
>>
>> So I'd like to resize hda2 but I can't as it said I need to unmount
>> hda2 before resizing. People suggest using a live CD but it's not
>> possible with my old laptop (I didn't even install etch using CD, I
>> can only install etch via goodbyemicrosoft.com). USB boot is also not
>> available.
>>
>>

>
> Have you considered reinstalling onto hda1 without removing hda2?
>

Or mount hda1 at some point on hda2 where you need the extra space.
Voila! 5 GB extra space. You could also remove hda1 and recreate
several partitions if you want to add space at multiple points in your
filesystem.

--
Marc Shapiro
mshapiro_42@yahoo.com



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 30/09/2007, 22h30   #4
Douglas A. Tutty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

On Sun, Sep 30, 2007 at 04:17:42PM -0400, Manu Hack wrote:
>
> I have a problem with an old desktop running etch. Before it was
> running XP + etch dual boot. But recently I have deleted the whole XP
> partition. Now the problem is I started running out of space for the
> etch. I want to resize the partition so that I can install more
> programs and stuff like that. The current partition is like
>
> hda1 - 5G (before running XP)
> hda2 - 1G ( etch is living here)
>
> So I'd like to resize hda2 but I can't as it said I need to unmount
> hda2 before resizing. People suggest using a live CD but it's not
> possible with my old laptop (I didn't even install etch using CD, I
> can only install etch via goodbyemicrosoft.com). USB boot is also not
> available.
>


Have you considered reinstalling onto hda1 without removing hda2?

Use debootstrap from your existing system. Make a grub-disk (floppy, so
your laptop can boot it) so that you can set up your boot loader if
something happens.

See the installation manual for installing from an existing unix system.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/10/2007, 02h10   #5
Manu Hack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

On 9/30/07, Douglas A. Tutty <dtutty@porchlight.ca> wrote:
> On Sun, Sep 30, 2007 at 04:17:42PM -0400, Manu Hack wrote:
> >
> > I have a problem with an old desktop running etch. Before it was
> > running XP + etch dual boot. But recently I have deleted the whole XP
> > partition. Now the problem is I started running out of space for the
> > etch. I want to resize the partition so that I can install more
> > programs and stuff like that. The current partition is like
> >
> > hda1 - 5G (before running XP)
> > hda2 - 1G ( etch is living here)
> >
> > So I'd like to resize hda2 but I can't as it said I need to unmount
> > hda2 before resizing. People suggest using a live CD but it's not
> > possible with my old laptop (I didn't even install etch using CD, I
> > can only install etch via goodbyemicrosoft.com). USB boot is also not
> > available.
> >

>
> Have you considered reinstalling onto hda1 without removing hda2?


Not really. Mainly because that old laptop is really old. No other
method is available to reboot other than that 6G harddisk.

> Use debootstrap from your existing system. Make a grub-disk (floppy, so
> your laptop can boot it) so that you can set up your boot loader if
> something happens.


Even floppy boot is not available.

>
> See the installation manual for installing from an existing unix system.
>
> Doug.
>



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/10/2007, 02h20   #6
Manu Hack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

On 9/30/07, Marc Shapiro <mshapiro_42@yahoo.com> wrote:
> Douglas A. Tutty wrote:
> > On Sun, Sep 30, 2007 at 04:17:42PM -0400, Manu Hack wrote:
> >
> >> I have a problem with an old desktop running etch. Before it was
> >> running XP + etch dual boot. But recently I have deleted the whole XP
> >> partition. Now the problem is I started running out of space for the
> >> etch. I want to resize the partition so that I can install more
> >> programs and stuff like that. The current partition is like
> >>
> >> hda1 - 5G (before running XP)
> >> hda2 - 1G ( etch is living here)
> >>
> >> So I'd like to resize hda2 but I can't as it said I need to unmount
> >> hda2 before resizing. People suggest using a live CD but it's not
> >> possible with my old laptop (I didn't even install etch using CD, I
> >> can only install etch via goodbyemicrosoft.com). USB boot is also not
> >> available.
> >>
> >>

> >
> > Have you considered reinstalling onto hda1 without removing hda2?
> >

> Or mount hda1 at some point on hda2 where you need the extra space.
> Voila! 5 GB extra space. You could also remove hda1 and recreate
> several partitions if you want to add space at multiple points in your
> filesystem.


That's what I'm doing. But is it possible to increase the size for
apt-get upgrade and apt-get install? Right now I can use that 5G for
personal use but for the main thing like in /usr what's the best way
to make use of that 5G?

Any good website showing how to do add space at multiple points in the
file system?

Manu


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/10/2007, 02h40   #7
Douglas A. Tutty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

On Sun, Sep 30, 2007 at 09:08:53PM -0400, Manu Hack wrote:

> Even floppy boot is not available.
>



My old Thinkpad can do netbooting. Can your laptop?

Or are you saying that the _only_ way to boot this thing is with its
internal hard drive?

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/10/2007, 02h50   #8
Douglas A. Tutty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

On Sun, Sep 30, 2007 at 09:11:50PM -0400, Manu Hack wrote:

> That's what I'm doing. But is it possible to increase the size for
> apt-get upgrade and apt-get install? Right now I can use that 5G for
> personal use but for the main thing like in /usr what's the best way
> to make use of that 5G?
>
> Any good website showing how to do add space at multiple points in the
> file system?
>



Put a filesystem on it (e.g. ext3), mount it under /mnt, cp -a or rsync
(or even use mc) everything under /usr, then unmount it from /mnt and
mount it as /usr. If it works, unmount it, change /etc/fstab, remove
everything under /usr and reboot.

Your main partition filesystem will now have additional free space
equivalanet to the size of /usr.

As for detailed instructions, its in one of the HOWTOs available as
something like doc-linux-howto; I think multi-disk HOWTO.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/10/2007, 06h30   #9
Marc Shapiro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

Douglas A. Tutty wrote:
> On Sun, Sep 30, 2007 at 09:11:50PM -0400, Manu Hack wrote:
>
>
>> That's what I'm doing. But is it possible to increase the size for
>> apt-get upgrade and apt-get install? Right now I can use that 5G for
>> personal use but for the main thing like in /usr what's the best way
>> to make use of that 5G?
>>
>> Any good website showing how to do add space at multiple points in the
>> file system?
>>
>>

>
>
> Put a filesystem on it (e.g. ext3), mount it under /mnt, cp -a or rsync
> (or even use mc) everything under /usr, then unmount it from /mnt and
> mount it as /usr. If it works, unmount it, change /etc/fstab, remove
> everything under /usr and reboot.
>
> Your main partition filesystem will now have additional free space
> equivalanet to the size of /usr.
>

To add this space at multiple points in the filesystem:

* Use fdisk (or your favorite partitioner) to remove hda1
* Recreate hda1 as an extended partition
* Create as many logical partitions within the extended partition as you
need
* Mount these logical partitions wherever you need them in the filesystem

--
Marc Shapiro
mshapiro_42@yahoo.com



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 02/10/2007, 04h10   #10
Raj Kiran Grandhi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /


> So I'd like to resize hda2 but I can't as it said I need to unmount
> hda2 before resizing. People suggest using a live CD but it's not
> possible with my old laptop (I didn't even install etch using CD, I
> can only install etch via goodbyemicrosoft.com). USB boot is also not
> available.
>


If a couple of reboots is ok for you, the following method might work.

You can use 'dd' to clone hda2 to hda1. Boot your system with
"init=/bin/bash". When you get to the bash prompt, do

bash# dd if=/dev/hda2 of=/dev/hda1

When that completes, you would have your installation available on both
the partitions. The 5GB hda1 would contain a filesystem that is only 1GB
large. Restart your system. You would boot normally with a 1GB root.

Edit "/boot/grub/menu.lst" and add an entry for the linux on hda1.
set root to (hd0,0) and append root=/dev/hda1 for the kernel line of the
new entry.

mkdir /tmp/newroot; mount /dev/hda1 /tmp/newroot

Edit the file /tmp/newroot/boot/grub/menu.lst and replace (hd0,1) with
(hda0,0) and root=/dev/hda2 with root=/dev/hda1. Similarly fix the root
filesystem entry in /tmp/newroot/etc/fstab by changing /dev/hda2 to
/dev/hda1.

Now you should be able to boot into either of your two partitions.

Once you have satisfied yourself that both are working, boot into your
1GB partition, and resize hda1. The command "resize2fs /dev/hda1" should
be sufficient.

Restart into the 5GB parition and now you would have a 5GB root with
over 4GB free space.

Run "grub-install /dev/hda" so that grub can load itself from the new
location.

You can now copy over your home directory from the 1GB partition and
continue using hda1. If you wish you format hda2 and mount it as /home.

Feel free to post any problems you may have and make sure you take a
backup of important files before proceeding.

Good luck,
rajkiran


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 04/10/2007, 19h40   #11
Manu Hack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

On 10/1/07, Raj Kiran Grandhi <grajkiran@gmail.com> wrote:
>
> > So I'd like to resize hda2 but I can't as it said I need to unmount
> > hda2 before resizing. People suggest using a live CD but it's not
> > possible with my old laptop (I didn't even install etch using CD, I
> > can only install etch via goodbyemicrosoft.com). USB boot is also not
> > available.
> >

>
> If a couple of reboots is ok for you, the following method might work.


Yes, and thanks a lot for the instruction.

>
> You can use 'dd' to clone hda2 to hda1. Boot your system with
> "init=/bin/bash". When you get to the bash prompt, do
>
> bash# dd if=/dev/hda2 of=/dev/hda1
>
> When that completes, you would have your installation available on both
> the partitions. The 5GB hda1 would contain a filesystem that is only 1GB
> large. Restart your system. You would boot normally with a 1GB root.
>
> Edit "/boot/grub/menu.lst" and add an entry for the linux on hda1.
> set root to (hd0,0) and append root=/dev/hda1 for the kernel line of the
> new entry.
>
> mkdir /tmp/newroot; mount /dev/hda1 /tmp/newroot
>
> Edit the file /tmp/newroot/boot/grub/menu.lst and replace (hd0,1) with
> (hda0,0) and root=/dev/hda2 with root=/dev/hda1. Similarly fix the root
> filesystem entry in /tmp/newroot/etc/fstab by changing /dev/hda2 to
> /dev/hda1.
>
> Now you should be able to boot into either of your two partitions.


So I got two grub/menu.lst, but how grub knows which one to read (one
is hda1 and one is hda2)?

>
> Once you have satisfied yourself that both are working, boot into your
> 1GB partition, and resize hda1. The command "resize2fs /dev/hda1" should
> be sufficient.
>
> Restart into the 5GB parition and now you would have a 5GB root with
> over 4GB free space.
>
> Run "grub-install /dev/hda" so that grub can load itself from the new
> location.
>
> You can now copy over your home directory from the 1GB partition and
> continue using hda1. If you wish you format hda2 and mount it as /home.
>
> Feel free to post any problems you may have and make sure you take a
> backup of important files before proceeding.
>


Finally I followed your instruction and now I got what I wanted.
Really thanks a lot and hopefully this can others too. (not to
mention I learned a lot!)

Manu


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 05/10/2007, 01h00   #12
Raj Kiran Grandhi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

Manu Hack wrote:
>>>

>> If a couple of reboots is ok for you, the following method might work.

>
> Yes, and thanks a lot for the instruction.
>
>> You can use 'dd' to clone hda2 to hda1. Boot your system with
>> "init=/bin/bash". When you get to the bash prompt, do
>>
>> bash# dd if=/dev/hda2 of=/dev/hda1
>>
>> When that completes, you would have your installation available on both
>> the partitions. The 5GB hda1 would contain a filesystem that is only 1GB
>> large. Restart your system. You would boot normally with a 1GB root.
>>
>> Edit "/boot/grub/menu.lst" and add an entry for the linux on hda1.
>> set root to (hd0,0) and append root=/dev/hda1 for the kernel line of the
>> new entry.
>>
>> mkdir /tmp/newroot; mount /dev/hda1 /tmp/newroot
>>
>> Edit the file /tmp/newroot/boot/grub/menu.lst and replace (hd0,1) with
>> (hda0,0) and root=/dev/hda2 with root=/dev/hda1. Similarly fix the root
>> filesystem entry in /tmp/newroot/etc/fstab by changing /dev/hda2 to
>> /dev/hda1.
>>
>> Now you should be able to boot into either of your two partitions.

>
> So I got two grub/menu.lst, but how grub knows which one to read (one
> is hda1 and one is hda2)?


Grub will read the menu.lst from the partition that contained
/boot/grub/menu.lst when "grub-install" was run.

>> Feel free to post any problems you may have and make sure you take a
>> backup of important files before proceeding.
>>

>
> Finally I followed your instruction and now I got what I wanted.
> Really thanks a lot and hopefully this can others too. (not to
> mention I learned a lot!)


This is one important reason why I am in love with linux. A little
curiosity and it lets you learn everything you care about hardware/software.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 05/10/2007, 01h30   #13
Manu Hack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

On 10/4/07, Raj Kiran Grandhi <grajkiran@gmail.com> wrote:
> Manu Hack wrote:
> >>>
> >> If a couple of reboots is ok for you, the following method might work.

> >
> > Yes, and thanks a lot for the instruction.
> >
> >> You can use 'dd' to clone hda2 to hda1. Boot your system with
> >> "init=/bin/bash". When you get to the bash prompt, do
> >>
> >> bash# dd if=/dev/hda2 of=/dev/hda1
> >>
> >> When that completes, you would have your installation available on both
> >> the partitions. The 5GB hda1 would contain a filesystem that is only 1GB
> >> large. Restart your system. You would boot normally with a 1GB root.
> >>
> >> Edit "/boot/grub/menu.lst" and add an entry for the linux on hda1.
> >> set root to (hd0,0) and append root=/dev/hda1 for the kernel line of the
> >> new entry.
> >>
> >> mkdir /tmp/newroot; mount /dev/hda1 /tmp/newroot
> >>
> >> Edit the file /tmp/newroot/boot/grub/menu.lst and replace (hd0,1) with
> >> (hda0,0) and root=/dev/hda2 with root=/dev/hda1. Similarly fix the root
> >> filesystem entry in /tmp/newroot/etc/fstab by changing /dev/hda2 to
> >> /dev/hda1.
> >>
> >> Now you should be able to boot into either of your two partitions.

> >
> > So I got two grub/menu.lst, but how grub knows which one to read (one
> > is hda1 and one is hda2)?

>
> Grub will read the menu.lst from the partition that contained
> /boot/grub/menu.lst when "grub-install" was run.


So if I want grub to read the menu.lst from hda1, I should boot in
using hda1 and run grub-install /dev/hda1 and then supposedly I can
use hda2 for other storage?

>
> >> Feel free to post any problems you may have and make sure you take a
> >> backup of important files before proceeding.
> >>

> >
> > Finally I followed your instruction and now I got what I wanted.
> > Really thanks a lot and hopefully this can others too. (not to
> > mention I learned a lot!)

>
> This is one important reason why I am in love with linux. A little
> curiosity and it lets you learn everything you care about hardware/software.


Yes, Linux is so good. After dual booting for a while I don't even
want/need to use M$ anymore and that's why I want to kill M$
completely. (not to mention the label on the laptop!)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 05/10/2007, 02h20   #14
Raj Kiran Grandhi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: resize the partition with /

Manu Hack wrote:
>>>> Edit the file /tmp/newroot/boot/grub/menu.lst and replace (hd0,1) with
>>>> (hda0,0) and root=/dev/hda2 with root=/dev/hda1. Similarly fix the root
>>>> filesystem entry in /tmp/newroot/etc/fstab by changing /dev/hda2 to
>>>> /dev/hda1.
>>>>
>>>> Now you should be able to boot into either of your two partitions.
>>> So I got two grub/menu.lst, but how grub knows which one to read (one
>>> is hda1 and one is hda2)?

>> Grub will read the menu.lst from the partition that contained
>> /boot/grub/menu.lst when "grub-install" was run.

>
> So if I want grub to read the menu.lst from hda1, I should boot in
> using hda1 and run grub-install /dev/hda1 and then supposedly I can
> use hda2 for other storage?
>

Yes, except that the command should be "grub-install /dev/hda" to
install grub on the master boot record.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 04h16.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,25135 seconds with 22 queries