Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2003 20:53:19 -0500
From:      Evermore_BSD <evermore_bsd@sympatico.ca>
To:        freebsd-newbies@freebsd.org
Subject:   Re: FreeBSD Preinstall Questions?
Message-ID:  <1068601997.6082.238.camel@ymir.ragnarok.fenir>
In-Reply-To: <200311110440.06926.ralphdewitt@charter.net>
References:  <200311110440.06926.ralphdewitt@charter.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2003-11-11 at 07:40, Ralph F. De Witt wrote:

> Evermore_BSD:
> Thankyou for your response. After I sent the email, I went out and bought a 
> copy of Teach yourself FreeBSD in 24 hours. Reading that I got the impression 
> that it had to be a EXT2 partition. So I moved the data around to reformat 
> the partition to EXT2, I killed my system, but managed to save the data in a 
> EXT2 partiton. So I jumped in to the install and have run up into my 
> knowledge barrier and lack there off. I am wondering if you could help with 
> my two most pressing problems.
> Now that I have FreeBSD installed, How do I find out what the EXT2 partition 
> is called so that I can get it mounted and get the data restored so that I 
> can stop drowning in my email?
> My other problem is with the networking. When I try to run cvsup I get the 
> following error:
> unkitty# cvsup /usr/local/etc/ports-supfile
> Cannot get IP address of my own host -- is its hostname correct?
> When I configured the network. I configured for DHCP and then filled in the 
> machine name unkitty as host and filled in a fictitous ralphfdewitt.org as 
> domain. The machine connects to the internet through a cable/dsl router and 
> then through a cable modem to the internet. Mail and Browsing works so I am 
> at a lost as to what may be wrong.
> Thanks for your past help. I hope that you can get me sorted out so that I can 
> get some breathing room to be able to read and sort the other little problems 
> out.
> 
> Ralph

This is from the handbook:

Table 3-1. Disk Device Codes


Code
Meaning
ad
ATAPI (IDE) disk
da
SCSI direct access disk
acd
ATAPI (IDE) CDROM
cd
SCSI CDROM
fd
Floppy disk


Example 3-1. Sample Disk, Slice, and Partition Names



Name
Meaning
ad0s1a
The first partition (a) on the first
slice (s1) on the first IDE disk
(ad0).
da1s2e
The fifth partition (e) on the
second slice (s2) on the second SCSI
disk (da1).

Now:

The easiest way is to simply look in /dev and as long as you know how
your hard disk is divided you won't have a problem. But being a newbie
you might not be all that familiar with FreeBSD naming conventions. As
you probably know by now FreeBSD has a different naming convention for
partitions referring to them as slices. A Linux formatted partition
shows up as a slice, FreeBSD slices are further divided up into
partitions with letter designations for each partition (ad0s1a to h). To
avoid confusion I will refer to the Linux partition as a slice from now
on you should start thinking of it that way also.

Assuming you have just one IDE hard drive (ad0: the first hard disk is
always 0 not 1) then if your Linux slice is a physical (primary) slice
it would be ad0s(1,2,3 or 4). If it is a logical slice then ad0s(5 and
up), it won't however have any partition letters. Look under /dev (ls -l
/dev/ad0s*) for an ad0s(x) slice number that isn't currently in fstab.
Unless you have a bunch of non BSD slices for other operating systems
like windows there will only be one and that's your Linux slice.

Mounting the slice is another story. Out of the box FreeBSD cannot mount
an Ext2 formatted slice so you need to recompile the kernel with Ext2
support. This can be compiled into the kernel or as a module. As I
prefer the module, I will show you that way. Simply add 
WANT_EXT2FS_MODULE=yes to the /etc/make.conf file (see
/usr/share/examples/etc/make.conf for an example of this and other
options) then compile and install your kernel and reboot. 

Load the module with "kldload ext2fs" (see the handbook to learn how to
do this at automatically at startup), naturally create a mount point for
the Linux slice (eg. /mnt/linux) then use the command mount_ext2fs eg.
"mount_ext2fs /dev/ad0s(x) /mnt/linux", don't waste time adding the
slice to fstab just use that command. Use umount as normal to unmount
the slice "umount /mnt/linux". 

One more thing, as is often said FreeBSD is very well documented, not
just the handbook but the man pages as well. I went through exactly what
you are going through right now, trying to mount a ext2 slice, just
about 3 months ago and the handbook and man pages help solved all my
problems. When in doubt about a command or some other thing remember
"man is your friend". The bsdforums.org (http://forums.bsdforums.org) is
also a very good place to go for help, using their search feature often
turns answers to common, and not so common questions much quicker than
posting a question to this list, or their forums and waiting for someone
to respond. However, feel free to ask further questions if you still
have problems.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1068601997.6082.238.camel>