Page 1 of 1

Installing Linux on a Thinkpad and the Vista Recovery Disk

Posted: Wed Oct 15, 2008 4:53 pm
by cs1971
Hi,

I'm currently in the market for a new ThinkPad (trying to decide between a T61 and a W-Series) which will be a dual boot Vista/Linux machine. From what I can see it looks like the laptop doesn't come with install disks for Vista but rather software allowing one to make a recovery disk. I'm not entirely sure what a recovery disk is but presumably it restores the machine to it's original configuration.

Can this disk be run on a blank drive? I ask because I've never been able to find a free tool to resize windows partitions. What I've done in the past is to just use the windows disks to reinstall windows and repartitioned the drive as part of the new install. Then I've installed Linux afterwards on one of the blank partitions I had subsequently installed.

I'm not sure though if this approach will work with a recovery disk. So, I guess my question is, what steps should I follow to turn a brand new ThinkPad with Vista pre-installed into a dual boot machine?

Thanks in advance.

-cs1971

Posted: Wed Oct 15, 2008 7:14 pm
by Superego
I'm not entirely sure what a recovery disk is but presumably it restores the machine to it's original configuration.
Yes, that's what they do and you should make a set as soon as you turn on your laptop.
I've never been able to find a free tool to resize windows partitions
Your best option is going to be Gparted (Gnome Partition Editor). It's a live cd that will allow you to resize ntfs partitions (along with a lot of other things). You can use it to resize your Vista partition and then either create new Linux partitions or leave the space empty and let Linux take care of it when you install your distro.

I'm not really sure if the Vista recovery disc will let you resize partitions. It might let you when you install Vista, but I highly doubt it would act as a partition editor (the way Gparted would). I don't use Vista and it's been while since I used XP so I really can't remember what the recovery discs will and wont let you do.

Hope this helps.

Posted: Wed Oct 15, 2008 8:02 pm
by cs1971
Superego wrote:Your best option is going to be Gparted (Gnome Partition Editor). It's a live cd that will allow you to resize ntfs partitions (along with a lot of other things). You can use it to resize your Vista partition and then either create new Linux partitions or leave the space empty and let Linux take care of it when you install your distro.
Thanks Superego, that's helpful. Despite what I said in the original message, the one time I did try to resize a NTFS partition, I was successful, but I recall having to dig all over the net to find a a free utility. I ended up with something written by some guy in Germany, and the English version of the instructions were barely intelligible. There were a few nervous moments :) It sounds like GParted will be a lot easier.
I'm not really sure if the Vista recovery disc will let you resize partitions. It might let you when you install Vista, but I highly doubt it would act as a partition editor (the way Gparted would). I don't use Vista and it's been while since I used XP so I really can't remember what the recovery discs will and wont let you do.
Okay, I guess this doesn't matter; GParted sounds good. One last question though about the recovery disk. Let's say I get the laptop, shrink the NTFS partition with GParted, install Linux and than at some point in the future break windows and need to use the recovery disc. Will it matter that the disk layout has changed? Is the recovery disk just a ghosted image or something else?
Hope this helps.
It did. Thanks.

-cs1971

Posted: Thu Oct 16, 2008 5:58 am
by Superego
If you do hose something in the future you can use the recovery disc to repair Windows. A good example is when you mess around with GRUB. You may have to restore the MBR to its original (i.e., Windows) state and the recovery disc will let you do this. Also, the disc is not a ghosted image. The name "recovery" makes it sound that way, but really it's just a Vista install disc with all the extra Thinkpad drivers and Thinkvantage software included.

Posted: Thu Oct 16, 2008 6:35 am
by carbon_unit
I have seen a lot of Thinkpad Recovery disc sets over the years and none of them were ever a regular Windows disc with Thinkpad drivers.
Thinkpads use the Rescue and Recovery program to restore Windows on a Thinkpad. It is a proprietary program that deletes all partitions on the hard drive and installs a hidden restore partition. Then you reboot back into Rescue and Recovery and it installs Windows from the restore partition and then customizes Windows according to a table that references to the model number embedded into the BIOS. Machines get their specific drivers and apps.
A recovery disc set will only work properly on a specific range of machines.

Dell and Gateway restore discs are Windows install discs with additional drivers....Sometimes.

Posted: Thu Oct 16, 2008 7:34 am
by Superego
You're right...brain fart on my part. I was thinking of my slipstreamed XP install disc. It's been while since I've had to use either.

Posted: Thu Oct 16, 2008 8:11 am
by carbon_unit
Superego wrote:You're right...brain fart on my part.
It happens to all of us. :wink:

Posted: Thu Oct 16, 2008 11:24 am
by cs1971
carbon_unit wrote:I have seen a lot of Thinkpad Recovery disc sets over the years and none of them were ever a regular Windows disc with Thinkpad drivers.
Thinkpads use the Rescue and Recovery program to restore Windows on a Thinkpad. It is a proprietary program that deletes all partitions on the hard drive and installs a hidden restore partition. Then you reboot back into Rescue and Recovery and it installs Windows from the restore partition and then customizes Windows according to a table that references to the model number embedded into the BIOS. Machines get their specific drivers and apps.
A recovery disc set will only work properly on a specific range of machines.

Dell and Gateway restore discs are Windows install discs with additional drivers....Sometimes.
Hmm. This is sort of what I was afraid of. It sounds like my scenario wouldn't work then and running the recovery disk would stomp on my Linux install. This is unfortunate.

-cs1971

Posted: Thu Oct 16, 2008 4:56 pm
by j-dawg
You can resize partitions--including your Vista partition--from within Vista itself:
http://www.howtogeek.com/howto/windows- ... ows-vista/

A very useful tool.

If you want to keep your recovery partition, the easiest way I've found to do it is to shrink the main Vista partition and install Linux on the remaining space, but install GRUB to the Linux partition. Then, using a live CD, use cfdisk to set your drive's active flag on your Linux partition. That's how I did it and it worked great.

After I screwed that up while working on something completely unrelated, I needed my PC up and running quickly, so I restored from a backup of a clean install that I had. Upon doing this I realized that I could think of no compelling reason to keep the recovery partition, especially when using Linux: I don't think it backs up Linux partitions.

So my recommendation would be to do a clean install of Vista and then install Linux. It's easy and universally understood, and you'll get that ~6GB from the recovery partition back. Just make sure you burn the recovery discs and test them first, so you can go back to factory settings whenever you need to.

Posted: Fri Oct 17, 2008 6:51 am
by Superego
You do still have options:

1) You can make a slipstreamed install disc and then if anything does happen you have a way to reinstall Vista to your existing NTFS partition. Keep in mind that the slipstreamed disc would contain only a vanilla Vista install, so you would have to download the necessary Thinkpad drivers and software from Lenovo. You can add drivers to your install disc, but you'll still have to manually install them.

2) I think your partitioning needs are covered, as you can use GParted as a live CD and Vista's tool from within Vista.

3) If you do remove the hidden partition I'd recommend investing in some imaging software; I prefer Acronis. Even if you do keep the hidden partition I think imaging/backup software is wise investment. Then if anything does happen you'll be able to restore either the entire hard drive or specific partitions (Acronis has this feature, I'm not sure about other software).

So here are 2 possible scenarios:
1) Hose Windows/Linux/Whole Drive
2) Restore specific partitions or whole drive with backups and imaging software.

1) Hose Windows/Linux/Whole Drive
2) Do a clean install of Vista with recovery discs
3) Recover space from hidden partition and partition hard drive with GParted or something else
4) Restore Linux partitions

Posted: Sat Nov 01, 2008 9:01 am
by Harryc
j-dawg wrote:If you want to keep your recovery partition, the easiest way I've found to do it is to shrink the main Vista partition and install Linux on the remaining space, but install GRUB to the Linux partition. Then, using a live CD, use cfdisk to set your drive's active flag on your Linux partition. That's how I did it and it worked great.
I understand the concept here ref. installing GRUB on the Linux boot partition and raising an active boot flag on it so that GRUB appears on boot. My question is after this is done, assuming that I have a valid working recovery partition, if I hold down the Thinkvantage button on boot, will the machine boot into Rescue and Recovery like it normally would? Also, if I ever want to ditch Linux on this machine, I'd just set the active boot flag back to the Windows partition and things would return to normal? Another question ref Acronis, if I use it from an Acronis boot disc, and back up the R&R partition, the windows partition, and the Linux partition, can all (3) be restored using the same disc and will the boot flag be in the right place, and everything as before, etc. ? Wouldn't there be a fourth MBR partition to back up as well?

Posted: Sat Nov 01, 2008 2:03 pm
by K0LO
Harryc wrote:I understand the concept here ref. installing GRUB on the Linux boot partition and raising an active boot flag on it so that GRUB appears on boot. My question is after this is done, assuming that I have a valid working recovery partition, if I hold down the Thinkvantage button on boot, will the machine boot into Rescue and Recovery like it normally would?
Yes, the code that does this is located in the first few sectors of the disk, so assuming that you have not written over Lenovo's custom MBR this will work. Note that installing any version of Windows will replace the Lenovo MBR. Also, installing GRUB to the MBR will replace the Lenovo MBR.
Harryc wrote:Also, if I ever want to ditch Linux on this machine, I'd just set the active boot flag back to the Windows partition and things would return to normal?
Yes; that's how I have my machine set up.
Harryc wrote:Another question ref Acronis, if I use it from an Acronis boot disc, and back up the R&R partition, the windows partition, and the Linux partition, can all (3) be restored using the same disc and will the boot flag be in the right place, and everything as before, etc. ?
Yes. When restoring with Acronis you can also specify whether you want a particular partition to be restored as Active or not.
Harryc wrote:Wouldn't there be a fourth MBR partition to back up as well?
A backup of the MBR is always included when creating any partition image with TI version 9 and above. If you have any partition images from when the Lenovo MBR was in use then you can restore the MBR separately if you ever accidentally overwrite it by installing Windows, etc.

Posted: Sat Nov 01, 2008 2:08 pm
by Harryc
k0lo wrote: If you have any partition images from when the Lenovo MBR was in use then you can restore the MBR separately if you ever accidentally overwrite it by installing Windows, etc.
Thanks for the information. I didn't think about using the backed MBR for this purpose, great idea.

Posted: Sun Nov 02, 2008 6:52 am
by Harryc
OK, this did not work. I installed Mandriva One on free space made with a gparted CD on my 100GB hard drive. It created 3 partitions, sda5 (root), sda6 (swap), and sda7 (/home). I installed GRUB on SDA5. The install went fine and I rebooted into Gparted. I set the boot flag to sda5 and saved/rebooted. Now the Thinkpad can't find a boot device.

Posted: Sun Nov 02, 2008 6:59 am
by tylerwylie
Trying to boot an extended partition?

Posted: Sun Nov 02, 2008 7:37 am
by Harryc
Are you saying that I can't boot to an extended partition? If that's the case I'll have to create my own partitions with Gparted then, because the Mandriva installer defaulted to creating an extended partition. Somewhere in the grey matter I seem to recall having this problem before, and the extended partition not booting rings a bell.

Posted: Sun Nov 02, 2008 7:45 am
by tylerwylie
Harryc wrote:Are you saying that I can't boot to an extended partition? If that's the case I'll have to create my own partitions with Gparted then, because the Mandriva installer defaulted to creating an extended partition. Somewhere in the grey matter I seem to recall having this problem before, and the extended partition not booting rings a bell.
I usually keep /boot on a primary partition, and throw the rest into extended partitions. / can be on an extended but /boot cannot I believe.

Posted: Sun Nov 02, 2008 7:48 am
by Harryc
Well, in this case there is no /boot, but all the Linux partitions are on an extended partition, including / (sda5), which is a root partition and is boot flagged. I will erase all and re-partition manually using Gparted.

Posted: Sun Nov 02, 2008 7:53 am
by tylerwylie
Harryc wrote:Well, in this case there is no /boot, but all the Linux partitions are on an extended partition, including / (sda5), which is a root partition and is boot flagged. I will erase all and re-partition using Gparted.
Yup, well there is a /boot just nested in /. I usually give /boot between 50mb-100mb in a primary partition and put as much space possibly into the extended.

Posted: Sun Nov 02, 2008 7:57 am
by Harryc
OK, let me repeat what I think you are saying so that I can do this correctly. I need to make an ext3 primary partition of 100mb or so for /boot. Then I need to create an extended partition. In that extended partition, I am going to create (3) partitions. / using ext3, /swap, and /home using ext3. Then I install Mandriva...how do I tell the Mandriva One installer to put just /boot into whatever partition I've created for it? ALso I'm assuming that I install GRUB to /boot then reboot into Gparted and boot flag it.

Posted: Sun Nov 02, 2008 7:58 am
by tylerwylie
Harryc wrote:OK, let me repeat what I think you are saying so that I can do this correctly. I need to make an ext3 primary partition of 100mb or so. Then I need to create an extended partition. In that extended partition, I am going to create (3) partitions. / using ext3, /swap, and /home using ext3. Then I install Mandriva...how do I tell the Mandriva One installer to put just /boot into whatever partition I've created for it?
When doing the formatting, can't you specify mount points for each partition you create? If so then just create a 100mb(can be ext2 as well) primary partition with the mount point of /boot, toggle it bootable, then do the rest in your extended partitions with /, 'swap' and /home.

Posted: Sun Nov 02, 2008 8:00 am
by Harryc
Sounds great, I'll try it. Thanks.

Posted: Sun Nov 02, 2008 10:46 am
by Harryc
Ok, everything works. It should be noted that if you go into Thinkvantage on boot it sets the XP partition boot flag back to default again, so you'll have to run Gparted once again to set it back to the /boot partition.

Posted: Sun Nov 02, 2008 11:22 pm
by tylerwylie
Harryc wrote:Ok, everything works. It should be noted that if you go into Thinkvantage on boot it sets the XP partition boot flag back to default again, so you'll have to run Gparted once again to set it back to the /boot partition.
Glad to hear that, that little nuance always gets the best of us 8)

Posted: Sun Nov 02, 2008 11:36 pm
by j-dawg
The first time I tried it, I somehow had seven megabytes of space created as a separate partition. That put me over the limit for primary and extended partitions, so my / was on an extended partition. I had to erase it all and start again. What a pain that was.