LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2006, 07:53 PM   #1
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 124

Rep: Reputation: 15
Need to re-partition laptop


Well I thought I did not need a DOS partition, but it looks like it would be a good thing after all. Laptop is RedHat 7.3 and has lots of work on it in installation. I
don't want to re-install (although that would solve the problem)

Here is my setup

/dev/hda1 /boot
/dev/hda2 /
/dev/hda3 swap

I want to take 10mb from /dev/hda2 and create a /dev/hda4 for DOS.

I have a desktop machine with plenty of room for /dev/hda on it and they are networked with Ethernet. Or is there a way to shrink/split the /dev/hda2 without
extensive copying.

Normally I would not ask for a "please just tell me step by step how to do this" but I want to be really careful with the laptop as it took me a long time to get it "just so" I have done some reading but I don't want to just launch into it myself.

I suppose my first step would be to get NSF working, I have not been able to get that yet.

Thanks for any help.
Ron.
 
Old 02-24-2006, 08:12 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
RH 7.3 is damn old - may or may not have the resize tools you need.
What filesystem is the partition you want to resize ???.
Regardless, you *must* backup the data before contemplating screwing around with partitions.

Which "DOS" do you want to install - e.g. if it's Win95, you'll have to move everything.
 
Old 02-24-2006, 10:22 PM   #3
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 124

Original Poster
Rep: Reputation: 15
The machine's only a Pentium MMX, so I use 7.3, others won't install. What tools?

I want to resize /dev/hda2 which is the '/' filesystem. I have about 140mb free and
I only want about 10mb.

I want to use MS DOS 6.22, although I might use FREEDOS.

What is the Linux tool to defrag a filesystem? I don't think I have ever seen one.
 
Old 02-24-2006, 10:37 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
'/' is the mountpoint, we need the filesystem type - enter the following command, and post the output here: "df -hT" (that's an upper case T).
Different filesystem types require different resizing tool(s).

For that amount of room, it might be easiest to steal from the swap partition.
I'm not 100% sure, but those DOS levels should only require a primary partition - no other special requirements unless your BIOS doesn't have the INT13 extensions (the infamous cylinder 1024 problem).
 
Old 02-24-2006, 11:24 PM   #5
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 124

Original Poster
Rep: Reputation: 15
Here's the df -hT:

Filesystem Type Size Used Avail Use% Mounted on
/dev/hda2 ext3 1.7G 1.5G 156M 91% /
/dev/hda1 ext3 48M 8.7M 36M 20% /boot
none tmpfs 22M 0 22M 0% /dev/shm

And an fdisk /dev/hda for good measure....

Disk /dev/hda: 64 heads, 63 sectors 1024 cylinders
Units= cylinders of 4032 * 512 bytes


Device Boot Start End Blocks Id System
/dev/hda1 * 1 25 50368+ 83 Linux
/dev/hda2 26 927 1818432 83 Linux
/dev/hda3 928 1024 195552 82 Linux Swap


Am I calculating correctly (1024 - 928) = 96 cylinders
96 * 4032 * 512 = 198180864 bytes... 193536K... 198mb??

I have more swap space than I have free space in '\'?
 
Old 02-24-2006, 11:36 PM   #6
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 124

Original Poster
Rep: Reputation: 15
P.S. Currently free shows I have 45mb of memory 1.5mb free, 195.5mb of swap 184.3 free with X, fluxbox, and 3 rxvt's open..

I launched Gimp, aislriot, and kpat and the free swap dropped to 167.6mb.. and things are slowing a little.
 
Old 02-25-2006, 02:22 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Man, I can't believe some of those numbers - try editting an image and see what happens...

I'd still suggest mangling the swap partition. If you logon straight to X, go back to single user mode - open a terminal, and enter "init 1".
After that "swapoff /dev/hda3" - then you can use fdisk to delete the partition, allocate it smaller, and create the DOS partition.
Use "mkswap /dev/hda3" and "swapon /dev/hda3" to make sure it works o.k., and reboot. Should be good to go.
 
Old 02-25-2006, 10:13 AM   #8
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 124

Original Poster
Rep: Reputation: 15
The only question... If I make my DOS partition /dev/hda4 out of the swap space that will put it way out at the end of the drive... will that be ok for Lilo?

I have been thinking... If I did re-install (ooh hatefull thought) I could not install all of KDE and GNOME and just use fluxbox, Installing just enough of kde for the kde programs I love- kde office, kshiesen, kpat just enogh gnome for gnomegames (wish I could get small stand-alone spreadsheet, I would use amiword, is there a small stand-alone solitair card game. anyway I would still want kshiesen. bleah.

I will try the cut swap in half route first though.
 
Old 02-25-2006, 01:41 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Lilo should find it o.k.

Don't know that I'd halve the swap though - just take what you need.
 
  


Reply



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
Partition on Laptop does not work xmeson Linux - Newbie 4 07-26-2003 06:15 AM
Partition problem again! With S2D, a laptop. xmeson Slackware 0 07-25-2003 02:57 PM
dhcp server will not connect to laptop after laptop OS upgrade phamnewan Linux - Networking 0 06-21-2003 10:47 AM
SUSE Linux 7.1 partition - Windows ME on laptop with Sis 630 chipset linuxqrus Linux - Newbie 3 12-29-2001 07:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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