Rebuilding Ubuntu on a Mac

Background

My last story was about rebuilding ubuntu on a Silverstone RM420 20-bay disk farm. Yesterday (10 Apr 2017) my two regular Ubuntu systems died, and this is the story about trying to recover from that disaster. The two systems were a. An old 21" iMac called 'echuca', and b. a 3-year old Acer Aspire S7 called 'lilydale'. This is particularly sad, as these two systems represented my attempts to wean myself of MacOSX and back to Unix, but it seems my Ubuntu Linux wanted to orphan me - often!

I thought at first I might have been hit by a virus, but both failures were brought about trying to upgrade the system software, in the case of echuca, installing the GNOME window manager, and in the case of lilydale, upgrading from Ubuntu 15 to Ubuntu 16.04. In the latter case, I started the upgrade and left it to run, only to find when I came back an hour or so later, that the screen hd gone blank (so I had no idea where it had got up to), and would not reboot.

Echuca offered a little more (?) insight - the install completed, and the system worked while running the Ubuntu window manager, but as soon as I logged out and back in again, selecting the GNOME window manager, the system crashed, and then would not reboot. The boot seemed to OK up to the point where it said "starting the User Manager for user 127", but then it just hung at that message.

12 Apr 2017

Tried booting from Linux build CD using the 'alt' key to get to the EFI dialogue - but could not see the disk in the list of options.

Tried booting from a MacOSX build disk using 'c' key - it rattled the CD drive, then timed out, and attempted to boot from system disk, giving the same User Manager error as above.

Tried booting from an Apple backup disk - success, but could not restore from this disk, as it said 'not the same computer' Huh??? So how are to supposed to recover from a fatal hardware failure that requires replacing the computer?

Tried booting from on old external disk - this worked (hurrah!), and gave a usable system, but then how to get recover files from the Linux ext volume? (They were backed up, but not the latest copies.)

Used the left shift key to get into GRUB and 'e'dit the menu, as per the instructions at http://askubuntu.com/questions/132965/how-do-i-boot-into-single-user-mode-from-grub . Changed the line linux /vmlinux-4.4.0-66-generic.efi.signed root=/dev/mapper/echuca--vg-root ro init=/sbin/upstart to ... ro single, and ran this.

This generated two messages, Loading Linux 4.4.0-72-generic ... Loading initial ramdisk ... then stopped.

Booted into recovery user mode and ran several checks such as fsck, network, etc, then ran as root in single user mode, and tried apt-get upgrade. Ran for several minutes fetching files. then reboot. It generated a login prompt, but accepted no keyboard input. so reboot again. Back to Started User Manager for UID 127 message!

reboot with alt key. no GRUB. Tried again, and ran recovery mode. This got me a single user root mode, but no network. Back to recovery mode, turned on network, then into root, from whence I su'ed into user ajh and was able to rsync all the recent files to another computer (dimboola, running Mac OSX.

Restarted echuca using the external drive, and then rebooted into target disk mode. Connecting dimboola and echuca via firewire then meant I could do a complete disk clone (taking just under 11 hours!), and giving me a now bootable Mac OSX system on echuca, having blown away the Linux image. The first time boot did involve a huge amount of disk traffic, which took forever. Not sure if this is a good thing. We shall see.

It was OK. The disk traffic was Spotlight re-indexing the disk.

14 Apr 2017

More stuff on fixing echuca after cloning:

Need to fix the hostname (System Preferences -> Sharing -> edit)

Need to fix all the .ssh directory entries for echuca

Need to fix the X11 pull downs for remote terminal connexions

Don't forget to change the value in ~/machine (used by various scripts)

15 Apr 2017

Tried rebooting with alt key to install Ubuntu. Both DVD disk and USB stick mounted. rEFI boot menu appeared, with Standard, recovery, and two USB icons appearing. Clicked left hand USB icon, DVD disk accesses heard for a few minutes, then - nothing. reboot with alt key. This time, no USB icons!

reboot alt again, this time with neither USB stick or DVD mounted. As expected, just two icons, rEFIt, and recovery 10.8.5. Plugged in USB stick, and USB icon appeared after a few seconds. Clicked it. GRUB menu appeared. Selected 'install Ubuntu'. Nothing happened.

Waited 2 minutes, still nothing, rebooted into MacOSX, plugged in earlier (15.10) USB stick (which did appear on desktop), and rebooted, no alt key. rEFIt menu appear, but no USB.

reboot with alt, and only Standard icon (labelled rEFIt) and Recovery icon appeared. Grrrr! Clicked the Standard icon, different rEFIt menu with Linux icon appeared. Clicked Linux icon, message 'Boot error' appeared.

Tried same thing again, this time selecting 'Boot EFI\BOOT\BOOTx64.EFI from' icon. GRUN menu. selected 'install Ubuntu'. Kernel panic, 'no controller'

Ditto, with DVD inserted. EFI boot now appears. Still went for rEFIt icon. 'Boot error' again.

Ditto. EFI boot icon selected instead. GRUB. Went for 'try Ubuntu', same panic.

Ditto, no USB stick only DVD. now no EFI boot icon! Selected rEFIt icon, went for Standard boot into MacOSX and gave up.

16 Apr 2017

Made a 16.10 USB boot using dd to copy the iso image, as follows

Last login: Sat Apr 15 12:18:32 on console
You have new mail.
Welcome to dimboola!

ajh@dimboola /Users/ajh 501 $ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Standard                999.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

ajh@dimboola /Users/ajh 502 $ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Standard                999.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *16.0 GB    disk2
   1:                 DOS_FAT_32 LINUX                   16.0 GB    disk2s1

ajh@dimboola /Users/ajh 503 $ sudo umount /dev/disk2s1
Password:
unount(/Volumes/LINUX): Resource busy -- try 'diskutil unmount'

ajh@dimboola /Users/ajh 504 $ diskutil umount
Usage:   diskutil u[n]mount [force] MountPoint|DiskIdentifier|DeviceNode

ajh@dimboola /Users/ajh 505 $ diskutil umount /dev/disk2s1
Volume LINUX on disk2s1 unmounted

ajh@dimboola /Users/ajh 506 $ sudo umount /dev/disk2s1
umount: /dev/disk2s1: not currently mounted

ajh@dimboola /Users/ajh 507 $ sudo dd if=/Users/ajh/Desktop/ubuntu-16.10-desktop-amd64.iso of=/dev/rdisk2s1 bs=1m

1520+0 records in
1520+0 records out
1593835520 bytes transferred in 371.895299 secs (4285710 bytes/sec)

ajh@dimboola /Users/ajh 508 $ 

Did not work: 'isolinux.bin missing or corrupted'

Tried building a 16.04 USB stick:

Last login: Sun Apr 16 13:19:12 on console
You have new mail.
Welcome to dimboola!

ajh@dimboola /Users/ajh 501 $ diskutil list/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Standard                999.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *16.0 GB    disk1
   1:                 DOS_FAT_32                         16.0 GB    disk1s1

ajh@dimboola /Users/ajh 502 $ sudo umount /dev/disk1s1Password:
umount: /dev/disk1s1: not currently mounted

ajh@dimboola /Users/ajh 503 $ sudo dd if=/Users/ajh/Downloads/Ubuntu/ubuntu-16. of=/dev/rdisk1s1 bs=1m
ubuntu-16.04.1-desktop-amd64.iso  ubuntu-16.10-desktop-amd64.iso
ubuntu-16.04.1-server-amd64.iso   

ajh@dimboola /Users/ajh 503 $ sudo dd if=/Users/ajh/Downloads/Ubuntu/ubuntu-16.04.1-desktop-amd64.iso of=/dev/rdisk1s1 bs=1m
1443+1 records in
1443+1 records out
1513308160 bytes transferred in 348.370901 secs (4343957 bytes/sec)

ajh@dimboola /Users/ajh 504 $ 

Also did not work, same message: 'isolinux.bin missing or corrupted'

Tried the USB on echuca:

This page is copyright, and maintained by John Hurst. 0 accesses since
16 Oct 2020
My PhotoMy PhotoTrain Photo

Local servers: Localhost Newport Burnley Everton Hamilton Kerang Ouyen Spencer (Note that these are only accessible on my local network.)
Public Web Servers: Hurst Server/ajhurst.org Home Server/ajh.co Home Server/ajh.id.au Internode Server (In order of preference; not all of these may be active.)
Dynamically generated at 20201016:1231 from an XML file modified on 20180703:0025.

263 accesses since 17 Jan 2019, HTML cache rendered at 20201018:2239