Re: resize the partition with /

2007-10-04 Thread Raj Kiran Grandhi

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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: resize the partition with /

2007-10-04 Thread Manu Hack
On 10/4/07, Raj Kiran Grandhi <[EMAIL PROTECTED]> 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 help 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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: resize the partition with /

2007-10-04 Thread Raj Kiran Grandhi

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 help 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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: resize the partition with /

2007-10-04 Thread Manu Hack
On 10/1/07, Raj Kiran Grandhi <[EMAIL PROTECTED]> 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 help others too.  (not to
mention I learned a lot!) :)

Manu


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: resize the partition with /

2007-10-01 Thread Raj Kiran Grandhi



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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: resize the partition with /

2007-10-01 Thread Douglas A. Tutty
On Mon, Oct 01, 2007 at 11:46:32AM -0700, harland christofferson wrote:
> Douglas A. Tutty wrote:
> > 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.
> 
> harland christofferson wrote:
> 
> why would you need to reboot. wouldn't deleting the mount point from
> /etc/mtab and running mount -a work instead? 

Because you're changing something that has to do with things that
automatically happen on boot.  I'd rather discover a problem now while I
remember what I did, than the next time I boot (a year from now?).

Unless you have production services going on, a quick reboot is a good
idea.  If you do have production services, schedule the reboot for the
next short maintenance window and be doubly sure that you've logged what
you've done.

Doug.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: resize the partition with /

2007-10-01 Thread harland christofferson

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.

harland christofferson wrote:

why would you need to reboot. wouldn't deleting the mount point from /etc/mtab 
and running mount -a work instead? 

>
> 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
[EMAIL PROTECTED]








Re: resize the partition with /

2007-09-30 Thread Marc Shapiro

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
[EMAIL PROTECTED]



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: resize the partition with /

2007-09-30 Thread Douglas A. Tutty
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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: resize the partition with /

2007-09-30 Thread Douglas A. Tutty
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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: resize the partition with /

2007-09-30 Thread Manu Hack
On 9/30/07, Marc Shapiro <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: resize the partition with /

2007-09-30 Thread Manu Hack
On 9/30/07, Douglas A. Tutty <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: resize the partition with /

2007-09-30 Thread Marc Shapiro

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
[EMAIL PROTECTED]



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: resize the partition with /

2007-09-30 Thread Douglas A. Tutty
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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: resize the partition with /

2007-09-30 Thread Amit Uttamchandani

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 <[EMAIL PROTECTED]>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



resize the partition with /

2007-09-30 Thread Manu Hack
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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]