LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-12-2006, 01:29 PM   #1
silkenphoenixx
Member
 
Registered: Aug 2006
Location: Pretoria, South Africa
Distribution: Linux Mint 13 Cinnamon
Posts: 66

Rep: Reputation: 16
Re-arranging a hard disk


Hello, all

I have an odd question. I'm unhappy with the way that I partitioned my hard disk. Is there a way to change it without having to reinstall?

I have a pretty big usb hard disk, so my thought was to copy everything to it, boot from knoppix or some other livecd, repartition the disk, copy everything back, edit /etc/fstab to reflect the new partitioning scheme and /etc/lilo.conf to be able to boot, then chroot into the new / partition, run /sbin/lilo and reboot. Would this work? It seems to be too easy to me, so I thought I'd ask for some help before I destroy everything...

Thanks in advance
silkenphoenixx
 
Old 10-12-2006, 03:16 PM   #2
rjwilmsi
Member
 
Registered: Mar 2005
Location: UK
Distribution: opensuse 12.2 x86_64
Posts: 563

Rep: Reputation: 38
Sounds about right. You should be able to resize partitions without erasing data too, but definitely backup before doing anything.
 
Old 10-12-2006, 03:34 PM   #3
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
Yep, itz something I've been doing for the past several years and it works without a hitch !! ;-)

Goodluck !
 
Old 10-12-2006, 03:56 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,283

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by silkenphoenixx
It seems to be too easy to me, so I thought I'd ask for some help before I destroy everything...
What you just described is a "bare metal restore from backups". It's what you would do should your harddisk decide to catch fire and self-destruct on you! Everybody should learn how to do a restore like this, and have the necessary backups completed before disaster strikes and you really need them. There's no rule that says you have to keep partition sizes identical to the originals during this restore process. If you're imaging a drive/partition then partition sizes come into play. Using the dd command for backup is considered imaging. But for a tar backup, if what you have in that tar file will fit inside your new partition size ... you're good to go. You will need to recreate the partitions and filesystems manually before restoring a tar backup. Create them with different sizes than the originals, and you've accomplished the task you asked about!

So your modified procedure is:
Quote:
...so my thought was to copy everything to it using tar or cp or rsync but not dd, boot from knoppix or some other livecd, repartition the disk, recreate the filesystems, copy everything back, edit /etc/fstab...
 
Old 10-12-2006, 04:06 PM   #5
ethereal27
LQ Newbie
 
Registered: Jul 2006
Posts: 11

Rep: Reputation: 0
This is what I want to do but I want to remove my win xp partition and make my laptop completely kubuntu.

Do I unmount the win xp partitions and make them the same as the kubuntu partitions?

currently my harddrive is 60gig's split even except for a fat32 partiton i use to store stuff between kubuntu and xp.

I would like to resize everything and use the entire 60, can someone point to a howto or something for some not experienced with this process?

I also have an external dvd burner there a way to burn whats needed to dvd? if so what? and how? I downloaded k9 for backing up but i have no idea how to use it.

anyone?
 
Old 10-13-2006, 01:27 PM   #6
silkenphoenixx
Member
 
Registered: Aug 2006
Location: Pretoria, South Africa
Distribution: Linux Mint 13 Cinnamon
Posts: 66

Original Poster
Rep: Reputation: 16
Hello, all, thanks for the advice so far.

I was planning on using cp. I hardly ever use tar, perhaps I should go through the man page for it and familiarise myself.

BTW, I did intend to recreate the filesystem, I just thought it would be obvious and left it out.

ethereal27, I don't know of a howto. You can as you suggest just unmount your partitions and make them the same as the one kubuntu uses. You need to then define new mountpoints for both and put them in your /etc/fstab.

Here's a simple guide (as root): (Remember to backup whatever you don't want to loose!)

mkfs.ext3 /dev/<xxxx>

<xxxx> is usually hda1, but I recommend you find out. If you examine your /etc/fstab it should contain this information.

Then you need to remove (or comment out, this is probably better, so you have the original ones as a reference) the lines in /etc/fstab that deal with the partitons and add new ones to deal with the changed partitions. Probably the only changes will be the filesystem type and the mount point.

You probably also want to give yourself permissions to read and write to them, so make yourself the owner:

chown <your username>:<your groupname> <mountpoint>

If you don't understand this, perhaps give more details of what exactly you plan to do, then someone can help you with more specifics.
 
  


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
Cloning 1 hard disk to smaller hard disk, dd or ghost? fireman949 Linux - Hardware 8 12-23-2012 12:51 AM
60GB laptop hard disk & 200GB external USB hard disk linux compatibility powah Linux - Hardware 0 03-07-2006 10:55 AM
Reiser file system / Hard Disk/ Hard Drive Problems Oxyacetylene Linux - Software 4 10-10-2005 02:24 PM
help with re-arranging hard disk partitions umichLinux Linux - General 4 04-10-2005 04:13 PM
Hard Disk question - Making a big hard disk MrAnonym Linux - General 2 09-15-2003 06:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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