turtles
May 18th, 2009, 11:14 PM
I searched for a how to only found this out of date one:
https://help.ubuntu.com/6.10/ubuntu/installation-guide/i386/linux-upgrade.html
I have the drive attached via a USB to ATA adaptor.
There is an old Ubuntu install on the drive that will not boot (waited too long for updates).
Here is what I had to do so far:
Mounted the drive in Gentoo
mount point is /mnt/osx/
The drives showed up as /dev/sda1 for boot and /dev/sda3 for / on my Gentoo laptop.
mount -t auto /dev/sda3 /mnt/osx/
mount -t auto /dev/sda1 /mnt/osx/boot/
cd /mnt/osx/
mkdir work
cd work
wget http://mirrors.kernel.org/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.13~jaunty1_all.deb
The next 3 instructions on the outdated guide modified to this:
ar -x debootstrap_0.X.X_all.deb
cd ..
zcat work/data.tar.gz | tar xv
I had to edit line 16 and remove the forward slash.
nano debootstrap-1.0.13/debootstrap
(Use CNTRL / to locate line 16)
Edit /sbin/
to be sbin/
Remove all of the the hozed system dirs like bin,sbin,usr,etc etc...
Save /home /var and /root as well as any others you want.
Or move them all to a back up.
This was hasty but it had old symlinks that broke bash
Use with caution check your working dir first.
rm -rf lib then do the same for bin and sbin
Next I run the command to install the base system over the old system:
usr/sbin/debootstrap --arch ARCH jaunty /mnt/osx/
ARCH is your arch (usr/sbin/debootstrap --arch i386 jaunty /mnt/osx/) In my case
It ends with:
W: Failure while configuring base packages. This will be attempted 5 times.
I: Configuring udev...
W: Failure while configuring base packages. This will be attempted 5 times.
I did not get a working copy of nano and a few other things so I am copying over mine:
cp -avx /lib/libncurses* lib/ && cp /bin/nano bin/nano
Next I am going bind my working system to the base of the new system:
mount -t proc none /mnt/osx/proc
mount -o bind /dev /mnt/osx/dev/
And mount the new Ubuntu system:
chroot /mnt/osx/ /bin/bash
I get some errors like
id: cannot find name for group ID 11
but I can see I am in by the bash history for the old root user.
i will update this as i progress.
Any tips or links to an updated guide would be great thanks!
https://help.ubuntu.com/6.10/ubuntu/installation-guide/i386/linux-upgrade.html
I have the drive attached via a USB to ATA adaptor.
There is an old Ubuntu install on the drive that will not boot (waited too long for updates).
Here is what I had to do so far:
Mounted the drive in Gentoo
mount point is /mnt/osx/
The drives showed up as /dev/sda1 for boot and /dev/sda3 for / on my Gentoo laptop.
mount -t auto /dev/sda3 /mnt/osx/
mount -t auto /dev/sda1 /mnt/osx/boot/
cd /mnt/osx/
mkdir work
cd work
wget http://mirrors.kernel.org/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.13~jaunty1_all.deb
The next 3 instructions on the outdated guide modified to this:
ar -x debootstrap_0.X.X_all.deb
cd ..
zcat work/data.tar.gz | tar xv
I had to edit line 16 and remove the forward slash.
nano debootstrap-1.0.13/debootstrap
(Use CNTRL / to locate line 16)
Edit /sbin/
to be sbin/
Remove all of the the hozed system dirs like bin,sbin,usr,etc etc...
Save /home /var and /root as well as any others you want.
Or move them all to a back up.
This was hasty but it had old symlinks that broke bash
Use with caution check your working dir first.
rm -rf lib then do the same for bin and sbin
Next I run the command to install the base system over the old system:
usr/sbin/debootstrap --arch ARCH jaunty /mnt/osx/
ARCH is your arch (usr/sbin/debootstrap --arch i386 jaunty /mnt/osx/) In my case
It ends with:
W: Failure while configuring base packages. This will be attempted 5 times.
I: Configuring udev...
W: Failure while configuring base packages. This will be attempted 5 times.
I did not get a working copy of nano and a few other things so I am copying over mine:
cp -avx /lib/libncurses* lib/ && cp /bin/nano bin/nano
Next I am going bind my working system to the base of the new system:
mount -t proc none /mnt/osx/proc
mount -o bind /dev /mnt/osx/dev/
And mount the new Ubuntu system:
chroot /mnt/osx/ /bin/bash
I get some errors like
id: cannot find name for group ID 11
but I can see I am in by the bash history for the old root user.
i will update this as i progress.
Any tips or links to an updated guide would be great thanks!