Is it possible to restart a text mode install that failed half way through?

6 replies [Last post]
ssg
ssg
Offline
Joined: 09/02/2014

All the software is installed but on cleanup the computer ran out of memory and the kernel panicked. Now I need a bootloader. Is it possible to restart the installer at the point where it installs the bootloader?

ssg
ssg
Offline
Joined: 09/02/2014

The system should really install the bootloader before installing software after minimal so that a basic level of functionality is there in case of an accident.

ssg
ssg
Offline
Joined: 09/02/2014

So I didn't restart the installer but I did everything manually.

From a rescue CD

Simply, mount the hard drive you have Linux on.

mount /dev/sdfoo /mnt

Mount special directories

mount /dev /mnt/dev
mount /proc /mnt/proc
mount /sys /mnt/sys

Chroot into the mount

chroot /mnt

Install grub

apt-get install grub

Install the basic stuff

/usr/sbin/grub-install /dev/sdfoo

Update the menu.lst file

update-grub

And you're done

leny2010

I am a member!

I am a translator!

Offline
Joined: 09/15/2011

Some caveats - a) I've never done exactly this so I can't promise it
will work b) I strongly question the wisdom of running Trisquel on a
machine too small to run the text mode installer.

Having said those the procedure will be something like

boot text mode install
get past select language and keyboard
Ctrl-Alt-F2 to get to the second console
Press Enter to start the Busybox shell

Then where /dev/sdX is your root and boot partition

# mount /dev/sdX /target
# mount --bind /proc /target/proc
# mount --bind /sys /target/sys
# chroot /target
# /usr/sbin/grub-install /dev/sdX
# /usr/sbin/update-grub /dev/sdX
# exit
# umount /target/proc
# umount /target/sys
# umount /target
# reboot

That's how I got around a failed grub install due to a screen corruption
bug with the Belenos betas text mode installer. But that was much later
in the process, so it might not work for you.

ssg
ssg
Offline
Joined: 09/02/2014

Yeah, my machine has 4GB of space. I suspect the actual reason the kernel crashed was that I booted the machine in legacy mode and the legacy BIOS code wasn't tested with Linux so the kernel mapped special hardware memory as usable memory which caused bad things.

leny2010

I am a member!

I am a translator!

Offline
Joined: 09/15/2011

Seems you did better than I could remember off the top of my head
(i.e. /dev) in between the time I started typing and my next email
refresh. :-)

A pox on cheap BIOSes, I'm sure you'll agree.

ssg
ssg
Offline
Joined: 09/02/2014

So for other reasons (EFI support is flaky) I need to redo the above stuff with grub-efi but I also need to install grub-efi first. I need to get some network stuff running so I can do DNS inside the chroot and apt-get can resolve the archives.
How do I get the net stuff working as well inside the chroot?

EDIT: I'm using DHCP and a workaround is to use OpenDNS's nameservers .