LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-05-2002, 05:28 PM   #1
Enforcer
LQ Newbie
 
Registered: Apr 2002
Location: Sweden
Distribution: FBSD 4.10, FBSD 5.2.1 , OBSD 3.4
Posts: 27

Rep: Reputation: 15
Adding harddrive


From the FreeBSD-Handbok:

If you have an IDE disk, substitute ad for da. On pre-4.X systems use wd.

Code:
# dd if=/dev/zero of=/dev/rda1 bs=1k count=1
# fdisk -BI da1 #Initialize your new disk
# disklabel -B -w -r da1s1 auto #Label it.
# disklabel -e da1s1 # Edit the disklabel just created and add any partitions.
# mkdir -p /1
# newfs /dev/da1s1e # Repeat this for every partition you created.
# mount -t ufs /dev/da1s1e /1 # Mount the partition(s)
# vi /etc/fstab # Add the appropriate entry/entries to your /etc/fstab.
The first row seems to work just fine.. or?
1+0 records in
1+0 records out
1024 bytes transferred in 0.000400 secs (2560338 bytes/sec)

but the second outputs an error:
******* Working on device /dev/ad1 *******
fdisk: invalid fdisk partition table found

I got a IDE hd, so I used ad for da... as you see..

My FreeBSD is 4.5-RELEASE, should I use wd??

Please help.. I want to use my new hd..
 
Old 05-06-2002, 02:43 AM   #2
5amYan
Member
 
Registered: Apr 2002
Location: The District
Distribution: FreeBSD, OBSD maybe Gentoo and Winblech XP
Posts: 291

Rep: Reputation: 30
is it seen at start up?
What does dmesg call it?

Have you tried setting it up through
/stand/sysinstall
?
 
Old 05-06-2002, 05:25 PM   #3
Enforcer
LQ Newbie
 
Registered: Apr 2002
Location: Sweden
Distribution: FBSD 4.10, FBSD 5.2.1 , OBSD 3.4
Posts: 27

Original Poster
Rep: Reputation: 15
> is it seen at start up?

yes..

> What does dmesg call it?

# dmesg | grep ^ad
ad0: 8207MB <ST38641A> [16676/16/63] at ata0-master UDMA33
ad1: 19541MB <Maxtor 2B020H1> [39703/16/63] at ata0-slave UDMA33

> Have you tried setting it up through /stand/sysinstall ?

ok.. no problem... but now I need some help to configure my /etc/fstab

something like this I guess.. or?

# Device Mountpoint FStype Options Dump Pass#
/dev/ad1s1e /shared ufs rw 2 2
 
Old 05-07-2002, 09:12 AM   #4
c0rk3y
Member
 
Registered: Apr 2002
Location: NY USA
Distribution: Gentoo1.4/ FreeBSD4.x
Posts: 78

Rep: Reputation: 15
Partitions

something like this I guess.. or?

# Device Mountpoint FStype Options Dump Pass#
/dev/ad1s1e /shared ufs rw 2 2
___________________________________________________

looks correct but the last part is the sequential order that you want it to come up.
Each slice created creates a different adXXXX so that requires the next number up.
 
Old 05-07-2002, 11:42 AM   #5
Enforcer
LQ Newbie
 
Registered: Apr 2002
Location: Sweden
Distribution: FBSD 4.10, FBSD 5.2.1 , OBSD 3.4
Posts: 27

Original Poster
Rep: Reputation: 15
My current fstab 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

If I add this line at the bottom..
/dev/ad1s1e /shared ufs rw 2 2

...should the "pass#" count up from 2 to 3..??

..or should it be 1, cuz its a new disk?

...then whay is my "pass#" on f g & e slice the same??
 
Old 05-07-2002, 03:37 PM   #6
c0rk3y
Member
 
Registered: Apr 2002
Location: NY USA
Distribution: Gentoo1.4/ FreeBSD4.x
Posts: 78

Rep: Reputation: 15
Slices

Okay question? When you first partioned the HD did you create a seperate slice(or shall i say HD partition) for each directory? Thats what it looks like to me but on my system I created a slice for swap, / , and a directory /storage. The /storage directory was left large enough to hold all my files and backups and such manners as that so if i loose the OS and unable to retrive it all i have to do is reformat the /root and remount the /storage. sorry for explinations and not sticking to the point. But anyway mine reads:
This is from memory and I just looked at it this morning as well.

/dev/ad0~ none swap sw 0 0
/dev/ad0~ / ufs rw 1 1
/dev/ad0~ /storage ufs rw 2 2
/dev/acd0~ /cdrom ~

and I read an article last nite that stated that but I cannt recall where it is. I apologize I would have posted it. But it did state that it increase for the sequential order for boot loading.
Right now im at work But when I get home I will back track and try and give you a better description.
 
Old 05-07-2002, 04:24 PM   #7
Enforcer
LQ Newbie
 
Registered: Apr 2002
Location: Sweden
Distribution: FBSD 4.10, FBSD 5.2.1 , OBSD 3.4
Posts: 27

Original Poster
Rep: Reputation: 15
I have ONE partition on my ad0 for BSD and divided it into 5 slices:
/ : /dev/ad0s1a
<swap> : /dev/ad0s1b
/tmp : /dev/ad0s1f
/usr : /dev/ad0s1g
/var : /dev/ad0s1e

I read "man fstab", about dump and pass#, and wonder if its realy necissary to check my new drive (ad1 : /shared) at boot / reboot.. cuz I will only use it for storage.. of *hm* private material.. music, films..
If you [or anyone] recommend that, I guess 2 IS the right value for pass#..

I would be very thankful if you could explain Dump.. I dont understand the man -page.. (for fstab)
 
Old 05-08-2002, 10:38 AM   #8
cheasy
LQ Newbie
 
Registered: May 2002
Location: Germany
Distribution: Solaris, FreeBSD
Posts: 2

Rep: Reputation: 0
Quote:
Originally posted by Enforcer
I have ONE partition on my ad0 for BSD [snip]

I read "man fstab", about dump and pass#, and wonder if its realy necissary to check my new drive (ad1 : /shared) at boot / reboot..
If you shut down your system normally, all file systems are marked clean when they get unmounted. fsck checks for the clean flag, then quits immediately. This needs about no time.

If your system crashes (or you yank the power chord), the file system may be damaged. No clean flag is present, so next time you boot your drive is checked.

Morale: yes, you want to have your file system checked every time you boot. If the system was shut down properly, this needs no time. if not, it prevents major headaches.

HTH
 
  


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
adding a harddrive for extra space fakie_flip Linux - Hardware 5 10-02-2005 08:39 PM
Problem adding a second harddrive gigglesnorter Linux - Hardware 1 05-21-2004 06:15 PM
Adding USB harddrive !!!! TheShemeta Slackware 1 11-06-2003 10:34 AM
Adding a new harddrive and KDE 3 BoonZie Linux - Newbie 6 11-20-2002 04:50 PM
adding a harddrive to linux jonfa Linux - General 6 03-03-2001 01:12 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 08:45 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration