nicklemarr
November 19th, 2011, 11:53 PM
Alright, first off, forgive my ignorance, I'm very new to *nix. Before yesterday I'd only used #!, Knoppix, Backtrack; and that was a long time ago.
I'm trying to install Ubuntu, and in the installation when it "installs GRUB2" I get an error because of the following:
The problem is that plugininstall.py runs grubinstaller.py which in turn runs /usr/share/grub-installer/grub-installer and that program crashes when /var/cache/debconf/config.dat is in use (locked). That crash causes grubinstaller.py to return error code 1 and abort. The reason that /var/cache/debconf/config.dat is locked is that the installer is written in python and runs a program called "debconf-communicate" which stays open for as long as the installer is open, and that is the process which is locking the file.
So as a messy workaround I did the following:
cd /usr/lib/ubiquity/ubiquity/components/
sudo rm grubinstaller.pyc
sudo gedit grubinstaller.py
Replaced "/usr/share/grub-installer/grub-installer" with "ls".
Thus grubinstaller.py doesn't install Grub. Instead, it will simply execute a meaningless "ls" (directory index) command. That means that you never run into the problem of grub-installer crashing since it's never executed.
The installer finishes now, but now I need to instal GRUB2 manually. So this is what I want to do:
sudo passwd root
su
mount /dev/sda1 /target
mount -o bind /dev /target/dev
mount -o bind /dev/pts /target/dev/pts
mount -o bind /sys /target/sys
mount -o bind /proc /target/proc
chroot /target
grub-install /dev/sda
reboot
But this is what I get:
sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
su
Password:
# mount /dev/sda1 /target
# mount -o bind /dev /target/dev
mount: mount point /target/dev does not exist
# mount -o bind /dev /target/dev
mount: mount point /target/dev does not exist
# mount -o bind /dev /target/dev
mount: mount point /target/dev does not exist
# mount /dev/sda1 /target
mount: /dev/sda1 already mounted or /target busymount: according to mtab, /dev/sda1 is already mounted on /target
# mount -o bind /dev/pts /target/dev/pts
mount: mount point /target/dev/pts does not exist
# mount -o bind /sda1/dev /target/dev
mount: mount point /target/dev does not exist
# chroot /target
chroot: failed to run command `/bin/bash': No such file or directory
# sudo /target
sudo: /target: command not found
# grub-install /dev/sda
grub-probe: error: cannot stat `aufs'./usr/sbin/grub-probe: error: cannot stat `aufs'.
# sudo mount /dev/sda1 /mnt && sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys && sudo chroot /mnt
mount: mount point /mnt/dev does not exist
# sudo mount /dev/sda1 /mnt && sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys && sudo chroot /mnt
mount: /dev/sda1 already mounted or /mnt busymount: according to mtab, /dev/sda1 is already mounted on /mnt
# sudo chroot /mnt
chroot: failed to run command `/bin/bash': No such file or directory
# chroot /mnt apt-get install grub-pc
chroot: failed to run command `apt-get': No such file or directory
# chroot /mnt
chroot: failed to run command `/bin/bash': No such file or directory
As you can see, I have mo clue at what I'm doing. I just want this to work. Can anyone shed some light on where I'm messing up. It's probably something obvious, but I'm sleep deprived right now.
I'm trying to install Ubuntu, and in the installation when it "installs GRUB2" I get an error because of the following:
The problem is that plugininstall.py runs grubinstaller.py which in turn runs /usr/share/grub-installer/grub-installer and that program crashes when /var/cache/debconf/config.dat is in use (locked). That crash causes grubinstaller.py to return error code 1 and abort. The reason that /var/cache/debconf/config.dat is locked is that the installer is written in python and runs a program called "debconf-communicate" which stays open for as long as the installer is open, and that is the process which is locking the file.
So as a messy workaround I did the following:
cd /usr/lib/ubiquity/ubiquity/components/
sudo rm grubinstaller.pyc
sudo gedit grubinstaller.py
Replaced "/usr/share/grub-installer/grub-installer" with "ls".
Thus grubinstaller.py doesn't install Grub. Instead, it will simply execute a meaningless "ls" (directory index) command. That means that you never run into the problem of grub-installer crashing since it's never executed.
The installer finishes now, but now I need to instal GRUB2 manually. So this is what I want to do:
sudo passwd root
su
mount /dev/sda1 /target
mount -o bind /dev /target/dev
mount -o bind /dev/pts /target/dev/pts
mount -o bind /sys /target/sys
mount -o bind /proc /target/proc
chroot /target
grub-install /dev/sda
reboot
But this is what I get:
sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
su
Password:
# mount /dev/sda1 /target
# mount -o bind /dev /target/dev
mount: mount point /target/dev does not exist
# mount -o bind /dev /target/dev
mount: mount point /target/dev does not exist
# mount -o bind /dev /target/dev
mount: mount point /target/dev does not exist
# mount /dev/sda1 /target
mount: /dev/sda1 already mounted or /target busymount: according to mtab, /dev/sda1 is already mounted on /target
# mount -o bind /dev/pts /target/dev/pts
mount: mount point /target/dev/pts does not exist
# mount -o bind /sda1/dev /target/dev
mount: mount point /target/dev does not exist
# chroot /target
chroot: failed to run command `/bin/bash': No such file or directory
# sudo /target
sudo: /target: command not found
# grub-install /dev/sda
grub-probe: error: cannot stat `aufs'./usr/sbin/grub-probe: error: cannot stat `aufs'.
# sudo mount /dev/sda1 /mnt && sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys && sudo chroot /mnt
mount: mount point /mnt/dev does not exist
# sudo mount /dev/sda1 /mnt && sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys && sudo chroot /mnt
mount: /dev/sda1 already mounted or /mnt busymount: according to mtab, /dev/sda1 is already mounted on /mnt
# sudo chroot /mnt
chroot: failed to run command `/bin/bash': No such file or directory
# chroot /mnt apt-get install grub-pc
chroot: failed to run command `apt-get': No such file or directory
# chroot /mnt
chroot: failed to run command `/bin/bash': No such file or directory
As you can see, I have mo clue at what I'm doing. I just want this to work. Can anyone shed some light on where I'm messing up. It's probably something obvious, but I'm sleep deprived right now.