«

»

Aug 08

Recover Kernel

Recover old Kernel

In case new kernel is not functioning well the following step will drive you to recover old kernel.

Restart your FreeBSD Machine

shutdown -r now

Stop the normal booting process by press option 6 [Escape to loader prompt] in your keyboard.

Enter the following command.

unload

load  /boot /kernel.old/kernel

boot

Now your previous kernel will be recovered.

Check your kernel version now

$uname -a

Using the Floppy drive

Ref, http://www.unixguide.net/freebsd/fbsd_installguide71/10.07-Using_the_Floppy_drive.htm

FBSD has its own file system. This file system is different that the MS/Windows file system. A MS/Windows PC cannot read FBSD file systems, but FBSD can read and write the MS/Windows file system. Both FBSD and MS/Windows must format the floppy disk to their file system.

o format a FBSD file system floppy disk

Load a floppy disk into the floppy drive.

$disklabel -w -r /dev/fd0 fd1440                   #FBSD ufs file system.

$newfs /dev/fd0                                            #create ufs file system on floppy

To use the floppy, the floppy drive must first be mounted to the system. The basic FBSD system comes with a generic mount point called /mnt I find it much more convenient to create a floppy mount point call /a like MS/Windows drive A which is the floppy drive. Since we have a new, clean, fresh install of FBSD the /a mount point has to be created. This only has to be done once.

To create /a floppy mount point

cd /       # change to top of directory tree

mkdir /a   # make directory

    1. To mount floppy drive

Load a FBSD formatted floppy disk into the floppy drive.

mount /dev/fd0 /a      # mount device to mount point /a

cd /a                  # change to /a

    1. To test floppy drive

You have already formatted the floppy, created the mount point, and mounted the drive.

cp /etc/motd /a/         # copy motd file to floppy

ls                       # list contents of directory,

# You should see the motd

# file listed as being on /a

    1. To remove floppy from drive

It’s real easy to just press the floppy drive eject button and remove the floppy disk. This will create problems for you as the floppy drive is still mounted and cannot be un-mounted without a floppy disk loaded in the drive. There is a sequence of commands you have to execute to free up the floppy drive before removing the floppy disk.

cd /           # change directory to top of directory tree

umount /a      # un-mount the floppy drive

If you get error message ‘device busy’, that means you forgot to change the directory pointer to a different location instead of /a. Do the cd / command again.

    1. To mount MS/Windows formatted floppy disk

Load MS/Windows floppy into floppy drive

mount -t msdos /dev/fd0 /a      # mount device to mount point /a

cd /a                           # change to /a

    1. Easier way to mount MS/Windows floppies

Like most users I have an environment of both MS/Windows PC’s and FBSD PC’s. It’s just too hard to keep separate floppy disks formatted just for FBSD and others formatted for MS/Windows. There are a lot of times when I need to copy files from FBSD to MS/Windows or the reverse. I have experienced the best way is to only use MS/Windows formatted floppy disks and configure FBSD to use them automatically. This can be configured in the /etc/fstab file

ee /etc/fstab

This is what the fstab file will look like.

# See the fstab(5) manual page for important information on automatic mounts

# of network filesystems before modifying this file.

#

# Device    Mountpoint  FStype  Options    Dump Pass#

/dev/ad0s1b  none       swap     sw         0     0

/dev/ad0s1a  /          ufs      rw         1     1

/dev/ad0s1f  /tmp       ufs      rw         2     2

/dev/ad0s1g  /usr       ufs      rw         2     2

/dev/ad0s1e  /var       ufs      rw         2     2

/dev/acd0c   /cdrom     cd9660   ro,noauto  0     0

proc         /proc      procfs   rw         0     0

You need to add the following line.

/dev/fd0 /a msdos rw,noauto,longnames 0 0

so the file looks like this

# Device    Mountpoint  FStype  Options    Dump Pass#

/dev/ad0s1b  none       swap     sw         0     0

/dev/ad0s1a  /          ufs      rw         1     1

/dev/ad0s1f  /tmp       ufs      rw         2     2

/dev/ad0s1g  /usr       ufs      rw         2     2

/dev/ad0s1e  /var       ufs      rw         2     2

/dev/acd0c   /cdrom     cd9660   ro,noauto  0     0

/dev/fd0     /a         msdos    rw,noauto,longnames 0   0

proc         /proc      procfs   rw         0     0

Save the file and reboot to enable.

After enabling your change by rebooting your FBSD system, you can now mount your floppy drive with this command:  mount /a

    1. To test auto floppy drive mount

Load a MS/windows floppy into thefloppy drive.

mount /a         # mount device to mount point /a

cd /a            # change to directory

ls               # list content of floppy disk

cd /             # leave directory

umount /a        # to dismount the disk in the floppy drive.

Leave a Reply