Jump to content

Moving partitions


Recommended Posts

I feared there could occur problems with dd, but didn't want to go into a bad argument. From a technical point of view, it may be fun to move partitions manually, but for just having partitions moved/resized, a gparted iso really is one of the best choices out there. You'd just invest only downloading about 30MB, one CD and about one hour when moving/resizing (and go after a coffee while working...). All point'n click stuff. What could be easier?

Link to comment
Share on other sites

See, I was kinda afraid of missing space too, but I checked and it looks fine to me. I'll use cp though from now on. I was just afraid for my root partition that cp might not carry over something I need for it to be bootable or whatever.

 

I'll look into gparted...bit late now...hah....but yea, I thought it was a full 700 meg ISO, not just a small 30MB. Might be useful to have in my collection though.

 

See, I was kinda afraid of missing space too, but I checked and it looks fine to me. I'll use cp though from now on. I was just afraid for my root partition that cp might not carry over something I need for it to be bootable or whatever.

Edited by Urza9814
Link to comment
Share on other sites

My bet is the new partition now appears to be 40GB instead of the 53GB you made for it

Urza9814, I would go with the above comment as well.

the partition is 53 but the filesystem will register 40 GB (maybe df can be used to check this)

You need to use resizefs to correct that.

(and because it is "risky" maybe you need a dd backup of it! ;)

 

I am not advocating dd against anything else, but dd is damn practical

(like any tools to be used for the right task)

Link to comment
Share on other sites

if you want to just copy files, you should be using good ol' cp with the proper switches.

 

This is what I used, worked a treat and doesn't take too long. And everything, well, just worked when I rebooted :woot:

Link to comment
Share on other sites

Hmm. Looks like you're right...but...apparently I don't have resizefs.

[urza9814@Arochone ~]$ df
Filesystem			Size  Used Avail Use% Mounted on
/dev/hda1			  40G   35G  5.2G  87% /
/dev/hda5			  44G  9.4G   33G  23% /home
[urza9814@Arochone ~]$ resizefs
bash: resizefs: command not found
[urza9814@Arochone ~]$ su
Password:
[root@Arochone urza9814]# resizefs
bash: resizefs: command not found

 

Think mebbe if I boot madriva move and just use Diskdrake to shrink it a bit then enlarge it again? lol

Can't do anything now though...I'll have to try later tonught.

Link to comment
Share on other sites

Think mebbe if I boot madriva move and just use Diskdrake to shrink it a bit then enlarge it again?

NO !

do not shrink, do not do anything to that partition, no e2fsck, until

you have sorted the filesystem,

 

man e2fsck

look at the end for the exact name of resizefs or follow cross-references

like tune2fs until you can find the name resizefs or whatever it is called

 

if you install updatedb then you can do a locate on resizefs or

resize2fs (whatever the name is, with locate you can look for resize)

Link to comment
Share on other sites

Hmm. Looks like you're right...
Of course I am...I did the same thing before myself :P

 

In the end I just redid the whole thing...repartitioned and used cp. cp works fine, as long as you use the right switches (man cp).

Link to comment
Share on other sites

resize2fs is not a command, nor is resizefs. I checked all the 'see also' at the bottom of the man pages, and came up with:

 

tune2fs

mke2fs

dumpe2fs

badblocks

 

Ah! ok, found it with a locate. It's resize2fs

I'm assuming I'll have to run this from a liveCD, since it's the root partition that I'm currently running off of? Can't do it now anyways though...I'm at school right now, checking all this stuff through webmin :)

Edited by Urza9814
Link to comment
Share on other sites

I get the following error with resize2fs:

 

Bad magic number in super-block while trying to open /dev/hda1
Couldn't find valid filesystem superblock

 

I then tried shrinking it a bit with diskdrake, in the hopes that by changing the size it would fix it...it didn't....but it didn't break anything either.

Link to comment
Share on other sites

This was the exact error I got when I tried to use resize2fs. Firstly, you cannot use it on ext3 partitions, you have to convert them to ext2 by removing journaling. I googled and found a howto on this but I can't remember the parameter right now.

 

In a previous post, I think in this thread, I just ended up creating new partitions on the disk and using the "cp" command to copy everything, and then working my way round that.

 

This is why I now use reiserfs, because the resize works.

Link to comment
Share on other sites

that error rings a bell, and yes you need a live cd

I cannot remember if I used the force -f parameter

At the time it was just a backup so I could try anything.

and I thought "magic"? oh well cannot be right anyhow because I have

transferred things onto another partition. Maybe I ran e2fsck than fixed the journal, then resize2fs. That was a while ago.

Sorry I am of little help here

 

Anyway Ianw1974 has a point since the beginning:

sometimes/often cp -R will do rather than dd

Link to comment
Share on other sites

spend 5 hours so far working on this thing, got it all copied over and then copied back using cp -a....and it won't boot. No init found. I ran the installer again...still no luck. Good thing is, I knew this was gonna happen...so I left a dd copy of it on my drive.

screw it...I'll live with 10GB lost for now. This thing's REALLY starting to annoy me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...