LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 05-06-2003, 01:40 PM   #1
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Make a partition bootable


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!
 
Old 05-07-2003, 02:07 PM   #2
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
I could not do it, and gave it up.

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a bootable floppy? iqbala Mandriva 3 10-17-2005 02:59 AM
forgot to make partition bootable nadroj Linux - Newbie 11 04-20-2005 10:17 PM
Make Debian and SUSE bootable from on logical partition lixy Linux - Newbie 3 03-28-2005 02:39 PM
how to make slackware bootable CD? slackman Linux - General 4 12-01-2003 05:58 AM
Gnometoaster <-- how to make a bootable CD? k0ljat Linux - Software 2 07-16-2003 04:35 AM


All times are GMT -5. The time now is 01:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration