Web Apps Since 2004.

Is your website boring?  Kick it up a notch.  Encodable apps easily drop into your website to make it modern, fun, and interactive, with features like file uploads, user accounts, paid subscriptions, protected pages, live chat, visitor logging, mailing lists, and more.
All apps include:
• Money-back guarantee
• No monthly fees
• Free tech support
• Easy setup (we can even do it for you!)

Gentoo Linux Hard Drive Upgrade

# Filed on Sep 9, 2007 by AnthonyDiSante reply

I recently had to upgrade a Gentoo Linux system from a 40 GB hard drive to a new 80 GB drive.  This system powers the stereo in my car, and I have a full backup of the system on the main PC in my house.  So I started by putting the new drive into a USB2 enclosure and hooking it up to the main PC, but of course you could also hook it directly to the system you’re upgrading, or even just put it inside the system you’re upgrading.  Anyway, here’s what I did.

Determine which /dev/sdX device the USB drive gets:

# dmesg |grep sd

Use cfdisk to partition the drive (I usually use a simple 2-partition setup: one partition of about 1GB for swap, and the other partition is the rest of the disk):

# cfdisk /dev/sda

Create the filesystems:

# mke2fs -j -m 1 /dev/sda1
# mkswap /dev/sda2

Mount the main partition:

# mkdir /mnt/new80gig
# mount /dev/sda1 /mnt/new80gig

Copy all the data over:

# rsync -av --delete /home/carstereo_backup/ /mnt/new80gig/

Edit the filesystem configuration if the new partition scheme isn’t exactly the same as the old one:

# vim /mnt/new80gig/etc/fstab

Unmount the new drive:

# umount /mnt/new80gig

Next I disconnected the USB2 enclosure and took the new 80 gig drive out of it.  I then opened up the old system (the one from my car), removed its old 40 gig drive, and installed the new 80 gig drive.  But of course, this new drive is not yet bootable.  The system is running an older version of Gentoo, and it uses LILO, which means I need to run the lilo command from within the system itself.  But since it won’t boot, I need to boot from a CD (or USB thumb drive, etc) and then chroot into the system.  I used a Gentoo install disc (install-x86-universal-2005.1) in an external USB CDROM drive to boot the system, then:

Mount the proc filesystem (if it’s not already):

# mkdir -p /mnt/gentoo/proc
# mount -t proc none /mnt/gentoo/proc

Mount the main partition from the new 80 gig drive:

# mount /dev/hda1 /mnt/gentoo

Activate/switch to the installation on the new drive:

# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile

Edit the LILO configuration if the new partition scheme isn’t exactly the same as the old one:

# vim /etc/lilo.conf

Run lilo to make the new drive bootable:

# lilo

If that command doesn’t give any errors, then you should be all finished.  Just reboot.

I ran into one other issue after rebooting, though: the boot-time filesystem check (e2fsck) was giving me an error, saying that "Filesystem has unsupported feature(s) ... Get a newer version of e2fsck!"  Since I had created the filesystem on a newer system with a newer version of ext2/ext3, it apparently included some features that the older system’s ext2/3 did not support.  So I had to determine which features were enabled:

# dumpe2fs /dev/hda1 |grep -i features

This showed the features has_journal, resize_inode, dir_index, filetype, sparse_super, and large_file.  I then ran "man mke2fs" to see which of those features were supported by the currently-installed ext2/3, and saw that all except resize_inode and large_file were supported.  The debugfs command can be used to disable features on a filesystem:

# debugfs -w /dev/hda1
debugfs: feature -resize_inode
debugfs: feature -large_file
debugfs: quit

(It’s apparently fine to run debugfs on a mounted partition.)

I then rebooted and everything worked fine.

Reply to this message here:

Your name
Email (why?)
Website (if you have one)
Subject
search posts:

home | archives ]

Shopping Cart

Your cart is empty.

Client Quotes

Nice script, it's saving the day on our project.
– Aaron W.
Our members think your software is fantastic...  I would recommend your software and your company to anyone.  Thanks for all your help.  It has been a pleasure dealing with you.
– Tommy A.
FileChucker is a great drop-in solution for file uploads, and worth every penny of its very reasonable cost.  Encodable's support is excellent to boot.
– Loren A.
Just one word: Fantastic.  10-minute job to plug FileChucker into my app, and it now works a treat.  It's through the hard work by people like yourselves that make my job so much easier.  Congratulations on an outstanding product... Many many thanks.
– Sean F.
Thank you VERY much for all of your help.  You've really impressed me.  We have support agreements for other software that costs thousands of dollars / year (just for the support), and most of them aren't as helpful as you have been.
– Keith Y.
FileChucker is helping drive the backend of several high profile entertainment sites for people like Shania Twain and Dolly Parton.  We're also using it to drive backend file uploads for a multi-billion dollar banking institution.  It's a great product.  We've tried other "chucking" upload solutions with progress bars using flash and php, but nothing works as reliably as FileChucker.
– Michael W.
I just want to say you guys really stand alone in that you have a quality product and you provide genuine customer service.  It's sad but those qualities are seldom found separately, much less together.  Thanks again for your time and help.
– Alex S.
The amount of customization in the program is incredible.  I was able to integrate it into my existing page layout relatively simply.  I was also able to easily customize the look/feel to match the current site.
– Jason M.
FileChucker is working great...  Clients love it.  Vendors love it.  We love it.
– Gerry W.
You've done a wonderful job with FileChucker and UserBase, and they have made a big difference to how our website runs.
– Nicholas H.
I just installed the demo of your product and got it up and running in no time.  I searched high and low for a decent login script and thank God I found yours.
– Adrian F.
Do you know how rare it is to have a "canned" shopping cart that can easily do complex pricing options on a single item?  Basically, they don't exist!  I have looked.  Everywhere!  And the few that might even come close to CornerStore's functionality cost a fortune!
– Tashina P.
Why didn't I just do this from the get-go?  So much easier.  Thanks for your work.  FileChucker makes my work easier.
– Dominic M.
Thanks again for a great product and great support - beyond expectations.
– Greg S.
I just wanted to say that yours is the first product that I've tested so far that hasn't failed on handling uploads.  This is going to work for a print company, so they are handling nothing but large files and all the other solutions I've tried so far have not been reliable.  So far yours has been 100% successful in my tests.
– Kevin H.
The work, the thought and the organization you put into this app is incredible.
– Bruce C.
I looked all over trying to find a simple cgi script.  I found that FileChucker was by far the best.  If you have issues with your hosting service's php.ini max upload size then this is the way to go.  Looking forward to future enhancements.
– Bob C.