LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 11-17-2010, 09:35 AM   #1
masterv
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Question Parted a boot partition?


My partition info is as below:

Number Start End Size Type File system Flags
1 32.3kB 3142MB 3142MB primary fat32 boot
3 3142MB 5749MB 2607MB primary ext3
2 5749MB 6004MB 255MB primary linux-swap

My lilo is installed on the fat32 partition. Here's what i want to do:
1./ Delete the fat32 partition
2./ Maximize the ext3 partition size

As you guys see, my hard drive is only 6g, that's why i decide to delete Windows partition and make a whole neat system of Linux. My laptop is too old, no cdrom drive, floppy drive and cannot usb boot, so i must make changes carefully, otherwise i might lose everything. How can i do?
 
Old 11-17-2010, 10:07 AM   #2
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
The simplest solution is: to run in Linux cfdisk program with the command cfdisk /dev/sda or cfdisk /dev/hda, to change the type of the first partition to 83 Linux, to write the new settings and to quit cfdisk.

Then use mkfs.ext3 program to create the filesystem with the command mkfs.ext3 /dev/sda1 or mkfs.ext3 /dev/hda1.

Next add to /etc/fstab file the line:

Code:
/dev/sda1       /home        ext3 defaults             1       2
or

Code:
/dev/hda1       /home        ext3 defaults             1       2
Finally mount for a while /dev/sda1 or /dev/hda1 device with mount /dev/sda1 /mnt/tmp or mount /dev/hda1 /mnt/tmp command and copy the contents of /home directory to /mnt/tmp directory leaving empty /home directory in the place where it was.

After the reboot of the system you should have the Linux system on the smaller second partition and /home directory on the bigger first partition.
 
Old 11-17-2010, 06:35 PM   #3
masterv
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by w1k0 View Post
The simplest solution is: to run in Linux cfdisk program with the command cfdisk /dev/sda or cfdisk /dev/hda, to change the type of the first partition to 83 Linux, to write the new settings and to quit cfdisk.

Then use mkfs.ext3 program to create the filesystem with the command mkfs.ext3 /dev/sda1 or mkfs.ext3 /dev/hda1.

Next add to /etc/fstab file the line:

Code:
/dev/sda1       /home        ext3 defaults             1       2
or

Code:
/dev/hda1       /home        ext3 defaults             1       2
Finally mount for a while /dev/sda1 or /dev/hda1 device with mount /dev/sda1 /mnt/tmp or mount /dev/hda1 /mnt/tmp command and copy the contents of /home directory to /mnt/tmp directory leaving empty /home directory in the place where it was.

After the reboot of the system you should have the Linux system on the smaller second partition and /home directory on the bigger first partition.
Very smart solution! Thank you w1k0. I'll try it.
 
Old 11-17-2010, 06:57 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,056

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Good theory, but you need to move, not copy the data to the new partition. Else the old data will remain there taking up disk space, but unable to be reached (or deleted). Well it can be, but involves more shenanigans like the above.
 
  


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
resizing partition using parted chymeira Linux - Newbie 2 09-14-2010 03:18 PM
using parted on a primary partition dfw7400 Linux - Server 4 07-28-2010 03:17 PM
parted: resizing ext3 partition rm_dash_rf_star Slackware 6 02-13-2008 10:02 PM
How do I partition my hd using parted? thanhthanh19 Fedora 3 10-23-2004 05:39 PM
Resize Partition with parted jdmml Linux - Hardware 0 07-08-2004 09:43 PM


All times are GMT -5. The time now is 12:25 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration