Partitioning a New Laptop

Talk about anything and everything not related to this site or the Dreamcast, such as news stories, political discussion, or anything else. If there's not a forum for it, it belongs in here. Also, be warned that personal insults, threats, and spamming will not be tolerated.
Post Reply
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Partitioning a New Laptop

Post by curt_grymala »

Greetings, guys!
I just got a new HP laptop today. I'm planning to partition the hard drive to make it possible to install OpenSUSE on it next week.

I would like to know, before I even turn the machine on for the first time, what the recommended practice for partitioning the drive is.

Should I go ahead and turn it on and let Vista 64 get installed, set up and configured, then partition the drive, or should I partition the drive before running the initial startup wizard?

Since it's an HP, I'm guessing that, as soon as I turn it on (without the gparted live disc inserted), it's going to boot right into a set up wizard to unpack and install Vista. Should I have the drive already partitioned before I do that, or should I run through that process, then resize the partitions?

I plan to shrink the Windows partition to about 25 gigs, leave the recovery partition alone, then create a new partition for the OpenSUSE installation (about 25 gigs), a standard swap partition, then partition the rest of it for all of my files, etc. (mounting it as /home for OpenSUSE and using it for most of my documents, etc. within Windows).

My next question is; if I partition the main segment of the drive (my files partition) as NTFS, is is possible to mount that as /home? My main partition on my desktop is formatted as ext2, but Windows sometimes corrupts files when I move them back and forth to that drive. Therefore, with the progress Linux drivers have made with NTFS, I think I'd rather save most of my files on an NTFS partition, simply because Linux seems to work more effectively with NTFS than Windows does with ext2.

Any advice you can offer would be great. Thanks.
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Partitioning a New Laptop

Post by BlackAura »

It doesn't really matter which order you do things in. Assuming HP aren't completely brain-dead, you should be able to resize the partition freely using gparted before it installs Vista. Once it's installed, you can shrink the partition from Vista's disk manager, or using a gparted boot CD.

Actually... assuming that HP aren't completely brain-dead might not be a good idea. Some of the Vista pre-installs I've seen are OK, but others are absolutely horrible (Toshiba, for example, which has some crap that reboots the machine about ten times and takes a couple of hours to set up). It's probably safer to shrink the partition after the OS is installed.

Safer still would be to image the damned thing, in case you need it, wipe the drive and install everything from scratch. Reinstalling Vista and preserving the OEM preactivation can be a bit tricky, but it's doable.

As for using NTFS for /home... It's theoretically possible, I suppose. Expect pain - you'd be using a completely foreign filesystem, with different semantics, a completely different security model, and a very strange filesystem driver (it's an application, rather than a traditional driver).

The basic problem is that, in the default configuration, NTFS-3G doesn't handle Unix permissions. All files are owned by the root user, and have permissions set to 0777 (everyone can do anything). Lots of Linux applications wouldn't work properly like this. To get this working properly, you have to map Windows and Linux user IDs to one another.

The basic approach would be something like:
  • Shrink Vista.
  • Create the required Linux partitions (/, /home, and swap). Format / as ext3, and /home as NTFS.
  • Install Linux, but do not use the /home partition.
  • Create a .NTFS-3G/UserMapping file on your /home partition.
  • Mount the new /home directory somewhere, and copy everything from the current /home directory.
  • Delete everything in the /home directory
  • Modify /etc/fstab to mount the /home partition using ntfs-3g
  • Hope like hell that nothing is broken
For the user mapping feature, you can just use the implicit mapping. That'll get the right behaviour in Linux, but your Windows users won't be able to access anything. If you have a 1:1 mapping of Linux and Windows user accounts (such as just one of each), then you can just map one to the other and get the right behaviour.

You have to use the usermap tool to generate the UserMapping file. If you run it from Windows, it generates a mapping file for the currently logged in user. Stick the Linux usernames in the right place, and put it in .NTFS-3G\UserMapping (case sensitive).

One other problem - since NTFS-3G doesn't do journaling, and refuses to mount an NTFS partition that hasn't been cleanly unmounted, you will have to boot into Windows first if your Linux system crashes, or runs out of batteries, or whatever, and check the partition for errors. I think the latest versions partially fix this, but aren't included in any distro yet. Running the latest version would probably be a good idea, for a number of other reasons.

There are probably a lot more problems with this approach that I can't think of at the moment, but in principle, it should work.

Hmm... This is actually an interesting problem. I might try it out in a VM later on, to see if it even works.

Edit: Yes, it works. You have to use a prerelease version of NTFS-3G, which you have to compile from source code, but I currently have an Ubuntu VM here running with /home on an NTFS file system, with correct mapping between Windows and Linux users. There are a few problems (you can create files from Linux that can not be accessed properly from Windows, for example), but it basically works OK.

Not sure I'd trust it though. It seems too outrageously hacky to ever work properly, even if it seems to be doing just that.
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Re: Partitioning a New Laptop

Post by curt_grymala »

Thank you for the detailed response, BA.

I think, with the information you've provided and the information I was able to get from the OpenSUSE forums, I'm going to do the following:
1) Main Vista partition (around 50 gigs - NTFS)
2) Main OpenSUSE partition (around 10 gigs - reiserfs)
3) /home/ partition (around 1 gig - ext2/3)
4) swap partition (whatever SUSE recommends)
5) /shared/ partition (whatever's left on the drive - NTFS)

I'll then use the /shared/ partition to store all of my (non-config) files to be shared between the two operating systems.

I'm planning to use the following guide to get Vista and OpenSUSE playing nicely together.
http://www.howtogeek.com/howto/windows- ... partition/

At the moment, I'm working on trying to get a working copy of the gparted live disc. I've got 0.3.7 burned, but it threw an error when it tried to resize my Vista partition. I downloaded 0.5.4-2 today, but my computer won't seem to boot from it. It just freezes on the BIOS screen until I eject the disc. Unfortunately, it was just released yesterday, and I haven't been able to get an MD5Sum, yet. I posted in the gparted forums looking for one.

I'm in the process of downloading 0.4.4-1 right now and will try burning it to see if I can use it.

I'll keep you updated.
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Partitioning a New Laptop

Post by BlackAura »

If all of your files are stored on another partition anyway, you might not even need the separate /home partition. Just a simple root partition would probably be good enough.

If you can't boot from a gparted LiveCD, you can use Vista's built-in Disk Management tool to shrink the Windows partition. Basically, boot the Vista partition, go to Control Panel, look for Administrative Tools (it's in there somewhere), then the Disk Management tool. It's kind of limited though - it can't move certain system files, or files that are in use, and you might have to defrag the drive before it works properly.

If you resize using gparted, you may have to screw around with the recovery mode on the Vista install CD to get Vista to boot again. i don't know if that's needed for newer versions of gparted, but it's definitely needed for older ones.
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Re: Partitioning a New Laptop

Post by curt_grymala »

I ended up getting gparted 0.5.4-2 to work properly. For some reason, I had to pop the CD in the drive just before the BIOS tried to read it.

I had to disable "Run fan whenever running on AC power" or whatever it is within the BIOS (I have a Targus chillmat, so hopefully that will help keep anything from overheating).

I got the partition resized (after freeing up half of my hard drive space by deleting the system restore points) and got OpenSUSE installed without much trouble.

I ended up being lucky, and didn't even have to restore Vista. It launched right into the disk scan without me having to put the OS disc in or anything.

Once I get OpenSUSE configured, I will create my "files" partition with the extra 100-150 gigs left on the drive.

Thanks for your help.
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
Post Reply