[nSLUG] Question re. Installing GRUB (not GRUB2) on a 'new' hard drive

George N. White III gnwiii at gmail.com
Sat Oct 29 15:07:16 ADT 2016

On Sat, Oct 29, 2016 at 1:26 PM, Frank Geitzler <
frank.geitzler at ns.sympatico.ca> wrote:

> I have  an old laptop running Ubuntu 10.04.4 LTS.  Or course, this release
> is no longer in support, but I want to retain it -but not on this computer.

https://help.ubuntu.com/community/Grub2 says: "GRUB 2 is the default boot
loader and manager for Ubuntu since version 9.10 (Karmic Koala)"

Why do you want grub and not grub2?

> I have partitioned a 'new' hard drive on a desktop machine with a similar
> (not identical) layout to that of the laptop.
> I have restored the two Ubuntu partitions (sda7 & sda8) to partitions sda6
> and sda7 of the 'new' hard drive using Clonezilla.
Usually, Ubuntu installs partitions for  "/boot", "/", and " linux swap".

This Linux Mint 18 (Ubuntu 16.04) has a bit different layout when using LVM:

$ sudo fdisk -l /dev/sda
[sudo] password for gwhite:
Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xed6b7785

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sda1  *       2048     999423     997376  487M 83 Linux
/dev/sda2       1001470 3907028991 3906027522  1.8T  5 Extended
/dev/sda5       1001472 3907028991 3906027520  1.8T 8e Linux LVM

/dev/sda1 is /boot, /dev/sda5 has logical volumes for "/" and "swap"

> I determined the UUIDs of partitions sda6 and sda7 of the 'new' drive, and
> used vim to edit /etc/fstab and modify it to refer to the new partition
> locations.
> I Googled 'How do I install Grub on a Ubuntu 10.04 system recovered on a
> new drive?'

Just to be clear, does the Desktop have other OS's installed or just the
partly installed) Ubuntu 10.04?  Do want to boot directly to Ubuntu 10.04 or
are you booting from another disk/partition and want to chain to the
10.4 boot loader?

In general, if I really need an older release I prefer to use it on a VM so
the internet connects to a current, supported OS.

If your desktop isn't really old, performance of the VM should be
comparable to the old laptop.  The 10.04 installation may not support the
newer hardware bits in your desktop.

> I looked at a number of responses from that query, and the following
> response seemed to fit my situation:
>     [SOLVED] restoring grub after a "successful" hd clone - Ubuntu forums
> Instructions near the end of the post , read:
> *Re: restoring grub after a "successful" hd clone *
> Boot the ubuntu Live CD/USB. Choose "try ubuntu". When the desktop loads
> open a terminal and do this:
> Code:
> 1. Type sudo grub. Should get text of which last line is grub>
> 2. Type "find /boot/grub/stage1". You'll get a response like "(hd0,4)".
>    Use whatever your computer spits out for the following lines.
> 3. Type "root (hd0,4)",
> 4. Type "setup (hd0)", to install GRUB to MBR
> 5. Quit grub by typing "quit".
> 6. Reboot and remove the bootable CD.
> Unfortunately, when I booted the desktop machine with the Ubuntu 10.04.4
> DVD, select 'try $ sudo fdisk -l /dev/sda
> [sudo] password for ubuntu',
> open a terminal with Ctrl-Alt-t, and enter 'sudo grub',  the response is:
> sudo: grub: command not found.
Those directions must be very old.  Try

Booting 10.04 from the Live DVD gives some hope that your desktop can run
10.04, but you may encounter issues with device drivers (network and sound
are the most common problem areas, but maybe you don't need them in 10.04.

> When I enter 'ls',  response is the list of folders from 'home' folder of
> the installation DVD, as follows:
> Desktop Documents Downloads Music Pictures Public Templates Videos
> When I enter 'cat /etc/fstab' the response is the three lines from that
> file on the DVD, rather than the edited fstab on partition sda6.
"Try Ubuntu" uses the "live" system on the DVD, not the system on the hard

> When I enter 'df', the list of devices does not include anything from the
> hard drive -so it is not mounted.
> It seems to me that I should be mounting sda and sda6 somehow, and
> referring to them somehow in the grub command, but I am not sure how to do
> either one.

Much of this is discussed in the above recovery link.

> Can anyone help?
> Thanks,
> Frank
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/mailman/listinfo/nslug

George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20161029/c96715e3/attachment.html>

More information about the nSLUG mailing list