Jun 4, 2010

Fun with Linux

Posted by Knick

After several failed attempts to read the ext2 partition on my old NAS drive I decided it was time to go to the old Linux partition and copy the files from there. It was a fun adventure that took me back to my college days of multiple terminal windows and text flying down the screen Matrix style. All in all I hope it will be worth it.

I wanted to get a Linux partition without doing a full install. I downloaded a neat app called Universal USB Installer and then downloaded a KNOPPIX V6.2 image. This allows you to do a full install of Linux on the USB drive. Booting to the drive will give you a fully functioning copy of Linux allowing me to do my file copy with ease.

First step was to make the USB boot drive. I grabbed my spare 4GB thumb drive and launched the Universal USB Installer application. When you run the installer it will ask for the ISO image you want to install, I selected the Knoppix image i downloaded and created a boot flash drive.

Second Step was booting to Knoppix, this went very smooth for my desktop, after booting to the USB drive it came up right away and detected my network card and grabbed an IP all without issues.

Now it was time to mount the old hard drive, mount the network drive, then copy the files. To accomplish this I did the following:

First, find the source drive by running the following command:

fdisk -1
I found that the disk I wanted was /dev/sdc2

Now I create a mountpoint for the drive by running the following command:
mkdir /mnt/sdc2
Then I Mounted the drive to that mountpoint. I had an issue when I tried to just run the basic mount command. The drive was part of a mirror and Linux refused to mount it, after some Googleing I found that I had to specify the file-system in the mount command and it worked no problem. I ran the following command:
mount -t ext2 /dev/sdc2 /mnt/sdc2
Next I created the mountpoint for the network share:
mkdir /mnt/network
Then I mounted the network share:
/smbmount //192.168.1.32/Volume_1 /mnt/network
Finally, I ran the Rsync command that would take everything from the source and move it to the destination. The source was /mnt/sdc2 and the destination was /mnt/network
rsync -auv --delete /mnt/sdc2 /mnt/network

I am letting this run overnight to see if it will finish the copy. Since Linux fully supports the ext2 file-system and since it has already gone further then it did in windows I fully expect it to finish. I will post again with final results.

I have lots of movies to watch this weekend, it better work!

*edit - 8 hours later and it is still copying!

3 comments:

Anonymous said...

Hi. I also run into a problem trying to mount the ext2 file system using ext2ifs in windows xp v1.08 firmware formated drives. In the past I mounted the ext2 file system using ext2ifs (drives formated with 1.07 firmware) with no problem. After formating new drives with ext2 in 1.08 firmware the drives could no longer be mounted with ext2ifs. Not sure why.

Anonymous said...

Looks like dlink made changes to firmware 1.08 and you can not use ext2ifs to mount your drives formated with 1.08. (eg formated with 1.07). So if you formated with 1.07 and upgraded to 1.08 without format it will also work. (not for 2TB drives).

mdadm --assemble --run /dev/md0 /dev/sdb2 (large pt)
mkdir /mnt/raid1
mount -o ro /dev/md0 /mnt/raid1

PS: more info here: http://forum.dsmg600.info/viewtopic.php?id=4910

Anonymous said...

Dlink changed the inode side from 128 to 256. Ext2ifs ext2 for windows only support inode size of 128. I tries ext2fsd that suports large indoes and after a reboot the drive was mounted in windows. However the copy was very unstable and had to use ubuntu to mount the drive.

Post a Comment