Solved Lost boot after upgrading from 7.2-RELEASE to 9.2-RELEASE

Please help.

I performed a freebsd-update -r 8.2-RELEASE upgrade from my 7.2-RELEASE FreeBSD 7.2-RELEASE #0 server.
After that, I did freebsd-update install, reboot, freebsd-update install again, and reboot.

( all that by SSH )

BUT, I had the brilliant idea to do: freebsd-update -r 9.2-RELEASE upgrade in sequence.

Result: no boot any more.

So, with help of http://mfsbsd.vx.sk/ I was able to boot from USB and I can mount my disks.

I tried:
Code:
cd /mnt/boot
mv kernel kernel.bad
mv kernel.old kernel
reboot
=== no luck

I tried:
Code:
mv kernel kernel.old
mv kernel.old1 kernel
reboot
=== no luck

I also tried:
Code:
- create a virtualbox machine with FreeBSD 7.2-RELEASE
- made a copy of the folder "/boot" from virtualbox
tar -cz -f /usr/local/www/boot72.tgz /boot

- unpack the virtualbox folder into the "/boot" of my broken server
cd /mnt/boot
rm -rf *
fetch http://192.168.56.11/boot72.tgz
tar -xvf boot72.tgz
rm boot72.tgz
reboot
=== no luck either

Please help what can I do now?
Is there a way to put a new kernel without loose my data?
 

Attachments

  • server.jpg
    server.jpg
    820.8 KB · Views: 221
Renaming kernel files is not going to create more space. It might be possible to free up space by deleting some unused kernel modules, but that is dangerous without a backup. Safer to move them to another partition.
 
I made a backup from /boot to /mnt-usr/backup before renaming kernels. I did this:
Code:
ls /dev
mount -v
mount /dev/mfid0s1a /mnt

mkdir /mnt-usr
mount /dev/mfid0s1e /mnt-usr
mkdir /mnt-usr/backup

cp -Rp /mnt/boot /mnt-usr/backup/

I suspect that the lack of disk space on / partition, somehow broke my attempt to upgrade, that probably was not completed successfully.

Moved kernel to kernel.old just to try booting with the kernel.old1 which renamed to kernel and tried to boot, but no luck.

As far as I understand, none of the three existing kernels in /boot is working. (kernel, kernel.old neither kernel.old1)
 
Please help.

I performed a freebsd-update -r 8.2-RELEASE upgrade from my 7.2-RELEASE FreeBSD 7.2-RELEASE #0 server.
After that, I did freebsd-update install, reboot, freebsd-update install again, and reboot.

( all that by SSH )

BUT, I had the brilliant idea to do: freebsd-update -r 9.2-RELEASE upgrade in sequence.

Result: no boot any more.

So, with help of http://mfsbsd.vx.sk/ I was able to boot from USB and I can mount my disks.

I tried:
Code:
cd /mnt/boot
mv kernel kernel.bad
mv kernel.old kernel
reboot
=== no luck

I tried:
Code:
mv kernel kernel.old
mv kernel.old1 kernel
reboot
=== no luck

I also tried:
Code:
- create a virtualbox machine with FreeBSD 7.2-RELEASE
- made a copy of the folder "/boot" from virtualbox
tar -cz -f /usr/local/www/boot72.tgz /boot

- unpack the virtualbox folder into the "/boot" of my broken server
cd /mnt/boot
rm -rf *
fetch http://192.168.56.11/boot72.tgz
tar -xvf boot72.tgz
rm boot72.tgz
reboot
=== no luck either

Please help what can I do now?
Is there a way to put a new kernel without loose my data?

I got my broken server running again, so, I'll post here what I did:


Download install iso from:
http://ftp-archive.freebsd.org/pub/...MAGES/8.2/FreeBSD-8.2-RELEASE-amd64-disc1.iso

1) CREATE A VIRTUAL BOX MACHINE WITH FreeBSD-8.2-RELEASE:
- 1024Mb RAM
- 8Gb Hd
- Network adapter #1 = NAT
- Network adapter #2 = Host Only
- CDROM pointed to FreeBSD-8.2-RELEASE-amd64-disc1.iso

Start
Code:
- 1 Boot FreeBSD [default]
- Country Selection: 232 United States
- Express (beguin a quick installation)

- FDisk Partition Editor:
-- A (use entire disk)
-- Q (finish)

- Install Boot Manager:
-- Standard

- FDisk Disk Label Editor:
Code:
-- C (create) 1024M (enter) FS (enter) / (enter)
-- C (create) 1024M (enter) Swap (enter)
-- C (Create) <full remaining size> (enter) FS (enter) /usr (enter)
-- Q (finish)

- Choose Distribuitions
Code:
-- (space) [x] Developer, [x] en, with ports
-- (space) [x] Kernel, [x] en, with ports
-- (space) [x] User, [x] en, with ports
-- <<< Exit
-- CD/DVD (enter)
-- "Last chance! Are you SURE you want continue the installation?"
-- [ Yes ]

- Visit the general configuration menu for a chance to set any last options?
Code:
-- [ Yes ]
-- Root Password
-- User Management, Add User
-- Login ID: john UID: 1001 Group: (blank)
-- Password: *** Confirm Password: ***
-- Full name: John Member groups: wheel
-- Home directory: (blank) Login shell: /bin/sh
-- [ Ok ]
-- Networking
-- [x] Interfaces
-- em0 (enter)
-- IPV6: no
-- DHCP: yes
-- Host: freebsd82 Domain: (enter)
-- IPv4 Gateway: (enter) Name server: (enter)
-- Ipv4 Address: (enter) Netmask: (enter)
-- Extra options: (enter)
-- [ OK ]
-- [x] Interfaces
-- em1 (enter)
-- IPV6: no
-- DHCP: no
-- Host: freebsd82 Domain: (enter)
-- IPv4 Gateway: 192.168.56.1 Name server: (enter)
-- Ipv4 Address: 192.168.56.11 Netmask: 255.255.255.0
-- Extra options: (enter)
-- [ OK ]
-- <<< Exit
-- (up) (up) (up)
-- X Exit
- [ X Exit Install ]
- Are you sure you wish to exit? The system will reboot.
[ Yes ]
( Devices: remove CDROM )

2) COPY FILES FROM VIRTUAL MACHINE TO SOME FTP SERVER:
- Logon to virtualmachine
Code:
mkdir /home/john/82
cd /home/john/82

# create compressed files to export
Code:
tar -cz -f boot.tgz /boot

tar -cz -f usr-lib.tgz /usr/lib
tar -cz -f usr-libexec.tgz /usr/libexec
tar -cz -f usr-obj.tgz /usr/obj
tar -cz -f usr-sbin.tgz /usr/sbin
tar -cz -f usr-src.tgz /usr/src
tar -cz -f usr-bin.tgz /usr/bin
tar -cz -f usr-include.tgz /usr/include
tar -cz -f usr-libdata.tgz /usr/libdata
tar -cz -f usr-share.tgz /usr/share

tar -cz -f usr-local-bin.tgz /usr/local/bin
tar -cz -f usr-local-include.tgz /usr/local/include
tar -cz -f usr-local-lib.tgz /usr/local/lib
tar -cz -f usr-local-libexec.tgz /usr/local/libexec
tar -cz -f usr-local-sbin.tgz /usr/local/sbin
tar -cz -f usr-local-info.tgz /usr/local/info
tar -cz -f usr-local-libdata.tgz /usr/local/libdata
tar -cz -f usr-local-man.tgz /usr/local/man
tar -cz -f usr-local-share.tgz /usr/local/share

# Send files to a ftp
Code:
ftp ftp://john@someserver.com
mkdir 82
cd 82
mput *

3) COPY FILES FROM FTP SERVER TO MY BROCKEN SERVER:
- Logon to my broken server using the live boot usb from http://mfsbsd.vx.sk/
Code:
1) Download the image for USB PENDRIVE:
http://mfsbsd.vx.sk/files/images/9/amd64/mfsbsd-9.2-RELEASE-amd64.img

2) Download the windows programa to write the pendrive:
http://sourceforge.net/projects/win32diskimager/

3) Boot my broken server from PENDRIVE.

4) Logon on my broken server using the mfsbsd:
root@mfsbsd:~#
User: root
Pass: mfsroot

5) Configure the IP, default route and DNS:
ifconfig bce1 123.123.123.123 netmask 255.255.255.0
route add 0.0.0.0 123.123.123.1
echo nameserver 8.8.8.8 >> /etc/resolv.conf

- Mount my "/" and "/usr" partitions on broken server:
Code:
ls /dev/
mount /dev/mfid0s1a /mnt

- If happens some error asking to run fsck, use:
Code:
fsck_ffs -f /dev/mfid0s1a
mount /dev/mfid0s1a /mnt

- In /mnt-usr let's mount my /usr
Code:
mkdir /mnt-usr
mount /dev/mfid0s1e /mnt-usr

- Download files of Virtual FreeBSD-8.2 from ftp
Code:
cd /mnt-usr/home/john
mkdir 82
cd 82
ftp ftp://john@someserver.com
cd 82
mget *
quit

- Extract files do local 82 folder
Code:
ls
tar -xvf boot.tgz

tar -xvf usr-lib.tgz
tar -xvf usr-libexec.tgz
tar -xvf usr-obj.tgz
tar -xvf usr-sbin.tgz
tar -xvf usr-src.tgz
tar -xvf usr-bin.tgz
tar -xvf usr-include.tgz
tar -xvf usr-libdata.tgz
tar -xvf usr-share.tgz

tar -xvf usr-local-bin.tgz
tar -xvf usr-local-include.tgz
tar -xvf usr-local-lib.tgz
tar -xvf usr-local-libexec.tgz
tar -xvf usr-local-sbin.tgz
tar -xvf usr-local-info.tgz
tar -xvf usr-local-libdata.tgz
tar -xvf usr-local-man.tgz
tar -xvf usr-local-share.tgz

- Copy the 82 files to my broken server folders
Code:
cp -Rp /mnt-usr/home/john/82/boot/* /mnt/boot/
cp -Rp /mnt-usr/home/john/82/usr/* /mnt-usr/

- Revise the rc.conf and rc.firewall of broken server
Code:
cd /mnt/etc
ee rc.conf
ee rc.firewall

- And now...
Code:
reboot
 
Back
Top