[svlug] linux installation advice?
slitt at troubleshooters.com
Tue Aug 7 19:13:33 PDT 2012
On Tue, 7 Aug 2012 10:49:30 -0700, Joanne Sun said:
> I need to get a laptop which runs a Unix or Linux command line prompt
> to install Python, Hadoop, Cascading stuff.
> Currently I have two laptops: a Win 7 Home and a Mac book pro (bought
> in 2007 or 2008 probably). I don't want to wipe out the Windows laptop
The suggestions to just use your Mac's underlying BSD or use Virtualbox
on your Windows PC are certainly good ones.
My situation is I use Linux 99% of the time and Windows 1%, and my
laptop's short on memory, so here's what I did...
If the Windows computer had any data I needed, I would have backed it
up on another computer. It didn't, so I didn't.
I backed up the computer's MBR by dd'ing the first 512 bytes, backed up
the partition table in human readable terms with fdisk -l, and backed
up the laptop's rescue partition by mounting another computer's disk
space using sshfs, and using ddrescue (from System Rescue CD) to copy
the raw restore partition to a file on another computer. With those
three things, I'm pretty sure if worst comes to worst, I can put it
back to the original factory-installed Windows.
Next, I went into Windows, deleted any data I didn't need, and used
Windows' facilities to defragment. Then I used Windows' partition
shrinker to see how much I could shrink the C: partition. It wasn't the
partition size minus the amount of data, because it had some unmoveable
Next I rebooted to System Rescue CD, and used gparted to shrink that
same partition by the amount shown by Windows. Then I used the
recovered space to make a drive for Linux, and installed Ubuntu there.
Ubuntu's smart enough to set the MBR correctly, but if it somehow
doesn't, reboot to Super Grub 2 Disk and boot your new Linux partition,
and use update-grub and grub-install to reset Grub2 and set the MBR to
boot its menu.
A much better and less risky way to do it would be to buy a brand new,
significantly bigger drive for the notebook, lay the original MBR
down on it, use ddrescue to populate the /dev/sda? device that
originally contained the restore partition, boot Super Grub2 disk to
boot that restore partition, and restore a factory installation on the
new, bigger disk. After doing that and verifying that Windows runs,
boot the installer for the distro of your choice, and install Linux on
a partition comprised of the extra space this disk has at the end. This
method avoids the risk of shrinking the C: partition.
Like I said, the Mac-as-BSD and VirtualBox solutions might very well be
better for you, but if not, this is another method.
Steve Litt * http://www.troubleshooters.com/
Troubleshooting Training * Human Performance
More information about the svlug