*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I made a mistake when replacing a system disk (da0), and I ended up with 5 unbootable partitions:
ad0s1b (should be swap)
ad0s1e (should be /)
ad0s1f (should be /var)
ad0s1g (should be /usr)
ad1s1e (should be /home)
Partitions on the ad0 drive are copies of the partitions on the old da0 drive (copied by cpio), but, as you may see, I do not have a bootable, type 'a' partition, so I cannot boot the system.
All that I have is a bootable FreeBSD 4.8 installation CD, but re-installing the whole system is out of question (too much work, too much time, and maybe too little skill).
My questions are:
1. So far as I can see the first thing to do is to make the ad0s1e partition bootable. Am I right? Can it be done using only the installation CD?
2. If so, what are my chances that the data remains intact on it while the partition type is changed (it should be labelled to ad0s1a)?
3. After making ad0s1e bootable, my next move would be to edit the completely obsolete /etc/fstab file. Am I right? How can I get a command prompt to do that after reboot?
4. I will need partition size information to write it into /etc/fstab. What command can I use to obtain that information?
5. The new swap space (ad0s1b) was formerly partitioned and labelled by sysinstall. Will the system automatically use it (supposed that I write it into /etc/fstab), or do I have to do any other special preparation?
6. When I copied the files from the / partition to the new drive, the system was in a high runlevel. When I copied the /var and /usr partitions, the system was in runlevel 1. What are my chances that the copies are correct in spite of the high runlevels, and I will have a clean system as before?
7. Are there any other special difficulties I cannot foresee?
Tomorrow in the morning I will have to wake up that system in the shortest possible time, so I would be grateful for any help.
Thank you in advance!
I could not change the file system type of ad0s1e to ad0s1a with sysinstall.
So I deleted everything including the slices and partitions, and decided to start it all over again from the beginning.
Soon after I was wondering about the meaning of a sentence in the FreeBSD manual: "type 'a' partitions are mounted to /". Does this also mean that if I create a partition as usual and specify / as the mount point, then that partition will automatically be a type 'a' partition?
But how could I specify / as a mount point, when the root partition of the old drive is mounted there? I should mount the new drive to /mnt. But then it will never be a type 'a' partition, and the new drive will not be bootable again.
So I decided to give it a try and specified the mount point of the root partition of the new drive as /. At first it seemed to be OK: the new partition was not actually mounted to /, but it became /dev/ad0s1a.
But from the time I mounted it to /mnt, in order that I can copy the files from the old drive to the new one, nothing worked as expected: cpio copied files it should not, these files could not be deleted, while the partition concerned seemed to be empty by df, partitions seemed to be merged, and so forth. I also had tons of 'superblock errors'.
I deleted all partitions on the new drive several times afterwards to get a clear situation, but I could no longer get rid of those errors, so finally I gave it up.
What did I do wrong?
Could anyone tell me how to replace a FreeBSD system drive?
Also: why fdisk told me that the geometry data of the drive is wrong and I should use the same geometry that was recognized by the system bios? I double checked it and it was the same!. Yet, I got this message anytime I tried to (re-)create a slice on the new drive.