March 19, 2007 1:40 PM   Subscribe

I just installed Ubuntu on a new laptop, and now I can't boot into Vista.

A few days ago, I purchased a new laptop. Since I had a lot of space available, I decided to install Ubuntu 6.10. I resized my Vista partition during the Ubuntu install and gave myself a total of 8GB for Ubuntu. To grab some networking files, I tried to jump back into Vista. Unfortunately, I can no longer access Windows!

When I turn on my computer, GRUB (bootloader) provides me with the three Ubuntu options (standard, recovery, memtest). I also have two entries for Windows (possibly due to the manufacturer-created recovery partition), both of which are "Windows Vista/Longhorn (loader)". Selecting the first Windows option brings up the Vista startup screen (with the progress bar and MSFT copyright), and eventually dumps me to a black screen with a mouse pointer at a non-native resolution. The only way out is to force a shutdown by holding the power button for several seconds.

If I select the second Windows option, the Vista startup screen appears and never goes away. The little progress bar just keeps running, and again the only escape is shutting down through the power button.

Windows gave me the option to run Startup Repair after I selected it from the bootloader. However, this just ran through the Vista startup screen and then dumped me to a black screen.

I found something on the Ubuntu forums that suggested running chkdsk could fix things. However, I have no way to do this. My XP CD (from older computers) won't let me enter recovery mode because it claims it can't find any hard drives. Using my Vista disc is no help; when I select "Repair My System" from the boot menu, I just get the progress bar and then a blank screen. I tried getting at chkdsk by burning a copy of the Ultimate Boot CD, loading NTFS4DOS, and running chkdsk from the windows\system32 folder on my Vista partition, but I got an error stating that the program can't be run in DOS mode.

As I said, I just bought this laptop, so if I have to start over with everything it won't be a total disaster. However, I'd rather avoid having to once again reconfigure everything, download my favorite programs, and transfer about 80GB of music and photos from my old hard drive. What should I do? And if my only option is to start over, how do I do this when my Vista disc, which is supposedly able to reinstall the OS, does nothing more than dump me to a blank screen?
posted by punishinglemur to Computers & Internet (18 answers total)
>My XP CD (from older computers) won't let me enter recovery mode because it claims it can't find any hard drives.

You probably have a SATA drive and the disc is pre-SP1. You can borrow/download a XP SP2 disc. Although i dont think ti will help you if you partitions are bad.

It looks like the partition is messed up. Did you resize it to install linux? Linux has very very poor NTFS support from everything to writing to messing with partitions. It can read NTFS nowadays without any major issues.

I would boot up the linux box and use whatever partitioning tool is standard on your distro (gparted) or the installer and make a good size NTFS partition for windows. Use your windows discs to install into that partition.

Essentially you want to install linux then windows. Windows then linux is problematic especially if you are messing with partitions.
posted by damn dirty ape at 2:57 PM on March 19, 2007

You need to chkdsk the Vista partition. I've had this problem too, and that fixed it. It seems the problem is caused by the partition resizer used by Ubuntu 6.10.

However, you need to use a non-Vista chkdsk. Do you have a WinXP or Win2K install disk around? Boot using it and then select the Recovery Console option. It should then identify your Vista partition, which you can select. You might need to enter your administrator password when prompted.

The command to issue is chkdsk /f. If this doesn't work, use chkdsk /? to find the option that does a full scan and fixes bad sectors (yes, I know you don't want a bad sector scan, but that particular option does a full disk repair). Sorry I can't give more specifics, but I'm working from memory here.

Alternatively, you MIGHT be able to fix this by marginally resizing the Vista partition using Ubuntu Edgy Eft's live distro mode, which should have the later version of the NTFS resizing software.

See here for more info:
posted by humblepigeon at 3:05 PM on March 19, 2007

Ummm... Sorry, damn dirty ape, but what you say is wrong. Millions of people have used Ubuntu to resize NTFS partitions, and it works pretty well. It uses ntfsresize, a very well established command-line tool.

As for installing Linux and then Windows, all that will happen is that Windows will wipe GRUB, leaving Linux unable to boot. You'll then have to mess around running grub-install, and adding a Windows entry to your grub menu.

The best policy is Windows first, and then install Linux.
posted by humblepigeon at 3:09 PM on March 19, 2007

Get thee to the ubuntu forums. I can almost guarantee that someone with your problem has asked for and received help there.
posted by chrisamiller at 3:45 PM on March 19, 2007

A friend of mine, who uses Linux, recently bought a notebook with Vista pre-installed on it. He told me that Vista put immovable blocks of data across the whole disk, making it impossible to resize using GParted without destroying data for Vista. This wouldn't surprise me, Microsoft is notorious for doing everything in their power to stop computer users from using alternatives to their products.

damn dirty ape's advice might be the only solution, with the caveat being that you'll have to manually install grub later. If I'm not mistaken, you have to have Windows on the first partition or it won't boot. I think there is a string you can put into grub that'll trick Windows into thinking it's on the first partition in order to boot.
posted by Mijo Bijo at 4:11 PM on March 19, 2007

ntfsresize (which is what gparted calls to do the actual NTFS filesystem shrink) is a fine and reliable tool. I'm not so convinced about gparted itself; if gparted were to shrink a partition that ntfsresize had not in fact successfully resized the filesystem on, things would break.

It would also not surprise me in the slightest to find out that Vista includes deliberate measures to make its system partition hard to resize; however, ISTM that any kind of resize is more likely to work on a partition that's been thoroughly defragged first and is mostly empty to start with.

If you want to set up a Windows+Ubuntu dual-boot machine, the best way to go about it is to start afresh, create a smallish system partition for Windows, then a 2GB Linux swap partition, then another smallish partition for Ubuntu, and then a large partition for huge files (movies and whatnot) you're going to share between the two. The shared partition is probably best formatted as FAT32.

Linux has been able for some time to read and write NTFS volumes using ntfs-3g, but although an Ubuntu package for this is available, it's not installed by default; also, the NTFS and POSIX permission models are different enough that any attempt to secure a shared NTFS partition is going to cause headaches.

Similarly, an ext2 driver is available for Windows, but it doesn't make any attempt at all to respect the permissions that Linux sets up on an ext2/ext3 volume.

FAT32 doesn't have any notion of permissions, so there will be no problem with two systems having a different idea about who gets to do what; with FAT32, everybody gets to do everything. FAT32 support is also native in both Windows and Ubuntu. Windows won't format a FAT32 volume larger than 32GB, but has no trouble accessing large FAT32 volumes created by other systems.

If you have a Vista installation CD, I would advise giving the laptop's inbuilt "recovery" partition the flick. Take the opportunity to install Vista, with as little additional cruft as possible, from CD.

If you have an XP installer disc and a valid XP licence for your laptop, upgrade Vista to XP :-)

To do the installation:

1. Boot from the Windows installer CD-ROM (XP or Vista, shouldn't matter - though I have never done this with Vista), and select the option to do a fresh install (not a repair).

2. When you get to the part where Windows is asking you where to install, wipe out all existing partitions and create a smallish NTFS partition that will become your Windows system partition. 16GB is more than you'll probably need. Leave the rest of the hard disk unpartitioned, and complete the Windows installation.

3. Boot from the Ubuntu CD-ROM, and use its partitioner to create 2GB of swap, another 16GB partition to mount as / (formatted either ext3 or reiserfs; if you eventually want Windows to be able to damage access it, use ext3), and the remainder as a FAT32 partition to mount as /media/shared.

After Ubuntu is installed, you should find /media/shared showing up on your Ubuntu desktop, and also accessible from Windows via its own drive letter under My Computer.

You should also find that Grub lets you chain-load the Windows boot code without any issues.
posted by flabdablet at 6:03 PM on March 19, 2007

Vista has a perfectly usable partition manager built in. Two days ago I bought a laptop and had my very first encounter with Vista. Right after that encounter I used the Vista tool to shrink the main Vista partition. Then I installed Debian on the vacated space. It worked. Your results may of course vary.
posted by rdr at 1:33 AM on March 20, 2007

Your symptoms sound familiar from when I was setting up a multiple-partition machine. Be warned: the following worked for XP, but I gave up for Vista. Each Windows O/S is more aggressive than the previous.

I had similar symptoms because the file boot.ini in the Windows/Vista partition did not correctly identify the boot partitions - the index number of each partition changed because of my repartitioning. Windows would get to the load screen but never the login screen.

boot.ini is a hidden system file. You can edit it by hand if you can get at the partition or boot to the recovery console with your Vista disk and use bootcfg.
posted by alasdair at 2:10 AM on March 20, 2007

Thanks for the Vista partition manager heads-up, rdr. As I've never personally laid eyes on Vista, could you tell me how to launch it? Is it part of the Disk Management tool?
posted by flabdablet at 4:10 AM on March 20, 2007

Sorry, damn dirty ape, but what you say is wrong.

Not at all, this happens all the time. It happened here. At least OSS advocates could be honest with users and tell them the risks of doing their own multi-partition installs. ANY attempt at partitioning existing data is a HUGE risk. The OSS tools are the least reliable of them all for NTFS. I've seen it happen so many times its not even funny. Linux support boards are full of the same question. If you have to repartition existing data spend the 30 bucks on Partition Magic. Or save your money and backup and start from scratch.
posted by damn dirty ape at 8:55 AM on March 20, 2007

Control Panel -> System and Maintainence -> Administrative Tools -> Computer Management

Chose Storage. Then chose Disk Management. And now you can play with the partition sizes.
posted by rdr at 9:36 AM on March 20, 2007

rdr, the Disk Management facility is available in XP as well. Are you telling me that in Vista, if you change the size of an existing partition, then Vista will massage the file system on that partition to make it suit the new partition size? Because it definitely doesn't do this in XP. If Vista does do this, can it do it to the partition (typically C: drive) that Windows is actually running from? Because that would be a Very Good Trick.

I agree with dda about resizing an existing partition being an inherently risky thing to do; it's something that shouldn't be done at all, IMO, unless you have a backup of the original partition (preferably a block-for-block image) and that applies whether you're using ntfsresize, gparted, Partition Magic or anything else.

Doing a multi-boot install on a new laptop that has only negligible amounts of user-created data, it will certainly be less trouble to rebuild it from the ground up than to use any method involving resizing existing partitions. And I say that as a fairly partisan OSS advocate.

That said: dda, I strongly suggest you have a play with a recent version of ntfsresize. Do a dummy run (using the -n option) before the live one. I have resized lots of filesystems with ntfsresize, and I never seen it corrupt a filesystem that passed the dummy run (I've also never done a resize without a dummy run first). If a filesystem can't shrink as much as I want, it can usually be persuaded to do so after being defragmented: Dave Whitney's defragmenter has been my tool of choice for that job. Versions of ntfsresize after 1.11.2 don't need a separate defragmenter.

I've also never seen ntfs-3g cause filesystem corruption. Not saying it couldn't happen - just saying I've never seen it, and I've used it for lots of Windows XP virus repairs.
posted by flabdablet at 5:26 PM on March 20, 2007

rdr, the Disk Management facility is available in XP as well. Are you telling me that in Vista, if you change the size of an existing partition, then Vista will massage the file system on that partition to make it suit the new partition size?

It worked for me.
posted by rdr at 1:48 AM on March 21, 2007

And was the partition you resized in fact the one you were running Windows from at the time? I'm prepared to be impressed here.
posted by flabdablet at 5:54 AM on March 21, 2007

Yes. Really it worked. My laptop shipped with two partitions. One is a tiny one that I suppose was is used for Vista recovery and the other, which took up most of the disk space, was where Vista was running from. I don't understand why you're so impressed. My memory may tricking me here but hasn't Partition Magic done the same thing in previous versions of windows?
posted by rdr at 7:14 AM on March 21, 2007

Yep, vistas disk management tool now has a 'shrink' option for partitions. It works, but its limited to cutting off the empty end of a partition. You can't, say, move partitions around or create a new one at the beginning of the disk. Screenshot here.
posted by damn dirty ape at 7:32 AM on March 21, 2007

I last used Partition Magic a very long time ago, and it ran from a self-booting floppy disk. Glad to see technology marching on.

Thanks for the Vista tip; it's the first Vista feature I've seen that I would definitely count as an improvement over XP.
posted by flabdablet at 6:46 PM on March 21, 2007

Bit late to the party, but installing ubuntu on an existing partition killed vista (on a wholly separate partition) for me. The answer was to use chkdsk as humblepigeon stated. I don't remember if I used the /f flag, but it was chkdisk from an old copy of winternals ERD or somesuch. XP's will do it too. It didn't report much of anything, but after running it both OS'es worked fine.

(Stumbled across this trying to figure out how to let vista and win2k co-exist on the same network.)
posted by IronLizard at 10:22 PM on April 17, 2007

« Older What does my US colleague mean?   |   Examples of Web Branding Gone Awry? Newer »
This thread is closed to new comments.