Click to See Complete Forum and Search --> : Installing Linux on an unfriendly NTFS partition!


ashibaka
04-21-2003, 09:00 AM
With FAT32 on its way out and WinFS still on the horizon, NTFS is, unfortunately, the filesystem that many people will encounter when they try to make a Linux partition on their computers. Having installed Linux in the upper ends of two different NTFS paritions now, I've discovered a generally easy way to do it. Here we go:

(Note: If you want to install Mandrake, you will be able to resize NTFS stuffies automatically with DiskDrake.)

(Note II: Do this at your own risk. Your partition includes everything on your disk, and if you mess up, your entire disk will be deleted without moving anything to a Recycle Bin.)

Download and burn yourself a copy of Knoppix (http://www.knoppix.net/). You can get to ntfsresize some other way, but this is the easiest.
Put the Knoppix CD-ROM in your drive and reboot. Something good will happen!
Reading this from Knoppix? Now it's time to download ntfsresize. Open this website in a new window: http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html
Read through any questions you want to know about, then go down to Question 6 and save the binary into your Knoppix home directory.
Go into the home directory and untar it. (If you don't know how to do this, you aren't ready for Linux.)
Press CTRL-ALT-F2 to get to a root console. Type in "passwd", then type the new password twice. Press CTRL-ALT-F5 to get back to Knoppix. Open up a new terminal, type "su" to get to root, enter the password you set. Finally, as root, go into the directory you untarred ntfsresize into.
Scroll down to Question 8, Solution 2 on the website. Skip the silliness about mounting a floppy drive, and follow the rest of the instructions using your root console. They should be easy enough.

If everything went well, you now have some free space on your computer for your Linux distro of choice! Before you do that, though, reboot into Windows to make sure everything is OK.

If you don't have a distro of choice, just use that root console and type "knx-hdinstall" to install an ace version of Debian on your system, automagically!

Hey, wait a minute! My partitions looked like this originally:
Device Boot &c.
/dev/hdc1 * 1 2200 90184939 b FAT32 or whatever
/dev/hdc2 2201 4999 90184939 5 Extended partition
/dev/hdc5 2201 4999 90184939 7 HPFS/NTFS
and I followed the instructions, but I can't make a new partition with a number greater than 4! AAAHHHH I've corrupted my disk, what do I do!!!

Don't panic! hdc5 (or hda5, or whatever) is a logical partition. That means it's a mini-partition inside the "extended partition" that takes up that space on hdc2. I will find the computer manufacturers that decided to ship extended partitions with their new computers and haunt them to their graves.

You've deleted both the extended and the NTFS partitions, right? Now make a new partition (n), but make it extended (e), then use its old starting cylinder (press enter, or enter it in if the default is wrong) and have it end with the size you chose for your resized NTFS partition (+11000M, +20000M, +whatever). Now here's the trick: make another new partition (n), make it logical (l), number 5 (5), and use the default start and end. Oh, and make sure to change its type to NTFS (command: t, partition: 5, hex code: 7).

If the new partition table (p) looks like what you want, then write it to disk (w) and reboot into Windows.

Something else is broken!

Search for it on the Internet. Or post a question to these forums. Or hire a computer expert. But please don't hurt me!

Sepero
04-22-2003, 03:40 PM
AHHHHHHHHHHHHHHH!
I DESTROYED MY WINDOWS PARTITION!!!
AHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!!!!
IT'S GONE FOREVER!!!!!!!!
AND IT'S ALL YOUR FAULT, ASHIBAKA!!!!!!!!!!


I had been needing a cool way to destroy windows for a long time now. Thanks ashibaka. :D


P.S.
This is obviously a joke incase you aren't that bright. The ntfs-resizer is actually very stable.