Forgot your password?
typodupeerror
Mandriva

Journal: Moving Linux to a new hard disk

Journal by vk2
I finally caved in to my temptations of upgrading my linux box with a new 160GB hard drive. I think I got a good deal on a Maxtor 160GB/8MB drive (98.50 with shipping). Also I saw a good deal on Corsair 512MB 3200 DDR for 80 USD. Till date I have made all my computer peripheral purchases from newegg.com - I haven't yet had one order/equipment go bad on me (touch wood). Ordered on Wednesday and the package arrived from New Jersey on Friday afternoon.

The memory install was pretty simply and easy. shutdown the machine, popped in the RAM and booted without any problems. [ Real memory problems later ]

Now came the time of installing the hard drive in the system. I already have a 60GB Maxtor hard drive in the system and for a few minutes pondered over how to use the new drive. One simple option was to use it as a secondary drive (No OS) but again I was tempted to make real use of the 8MB cache and ATA/133 of the new hard drive. Finally decided to use the main drive for the system and use the existing 60GB hard drive as secondary.

I must agree, though I am very much familiar with the OS I don't think I am somekind of real SA or some sharp hacker. Till date, whenever I had an opportunity to move/migrate to new disks, I always ended up with a fresh install of the OS and copying back my /home directory. Today I had about 4 hours of free time and decided to try to copy over the entire partitions to the new disk and then reinstall the bootloader.

To simplify installation and configuration, I always prefer to have 3 partitions for my Linux systems at home:
/dev/hda1 10GB primary
Linux Swap 2GB primary
/dev/hda3 Rest primary

Many people prefer having /var, /tmp on to different partitions but I haven't yet been convinced about the reasons.

I started with placing the new disk as primary (hda) and the old one as secondary (hdb). popped in a Mandrake 10 CD 1/3 and logged in to console with "linux rescue". started fdisk /dev/hda and partitioned the disk as listed above.

I am not sure why I couldn't find the mke2fs in the rescue mode. Rebooted my rescue session and booted knoppix 3.4. formatted both the partitions with ext3.

Now I was ready to copy over the data and install the boot loader, I googled for some standard instructions and ended up with this fine documentation:
http://www.brandonhutchinson.com/Moving_Linux_to_a_new_hard_disk.html

Well, I rebooted the knoppix session and logged in to console with "linux rescue" option while booting with Mandrake 10 CD 1/3.

Mounted both the disks and copied over the / data (ignored instructions for /boot as I don't use a dedicated /boot partition).

One potential issue I faced with the instructions was they lacked for grub loader. If you are using grub you are on your own. So once again google came to my rescue and found simple instructions to (re)load the bootloader.

chrooted to the new setup. [ chroot /new ]

invoked grub [ grub /dev/hda ]

{ grub> is the grub prompt }

grub> root (hd0,0)

grub> setup (hd0)

grub> quit

voila - migration completed.!! Since I didn't modify the partition setup - I didn't had to fiddle with the fstab. I just rebooted the session and eureka - I have the complete system on the new hard drive. Reminded me of the 3 reboots that Ihave to do when I use Norton ghost to ghost my windows 2000 installation to reregister some device drivers.

Large memory issue with Mandrake 10 official release.

When I installed the new 512 MB stick in the system - I didn't notice the 986MB RAM listing in the dmesg - it was only when I read the status in phpSysInfo I realized that the kernel is not recognizing all the memory installed on the system - The BIOS makes a complete tests of installed RAM but not my OS. Once again googled on about the 896MB RAM and found a simple solution: use either of the enterprise-2.6.3.15mdk-1-1mdk or 2.6.3-15mdk-i686-up-4G kernel. Tried the first one but it hung at loading networking. The second one just worked fine. After installing and a reboot I can now see all of the installed RAM.

In case if you are wondering why I want over a gig of RAM:
I am a Oracle DBA with core competancies in Oracle 9i. I am learning the new version - Oracle 10g and also, I am upgrading my skill set to work as a Weblogic systems Administrator. I need all the RAM to keep my 4 test databases and 4 weblogic servers up and running without paging to disk.

"You know, we've won awards for this crap." -- David Letterman

Working...