26dd4
![]() |
|
|
|
|
|||||||
| General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
Hi there.
I completed the installation of FreeBSD on my comp. My computer has 2 HDD. On the first HDD I have Ubuntu and I think but not sure that has ext3 FS. I created the mount point an try some: Code:
# fdisk -l
fdisk: illegal option -- l
usage: fdisk [-BIaipstu] [-b bootcode] [-1234] [disk]
fdisk -f configfile [-itv] [disk]
Code:
# # ls /dev/ acd0 cuad0.init kbdmux0 stdout ttyvb acpi cuad0.lock klog sysmouse ttyvc ad6 cuad1 kmem ttyd0 ttyvd ad6s1 cuad1.init log ttyd0.init ttyve ad6s2 cuad1.lock mdctl ttyd0.lock ttyvf ad6s5 dcons mem ttyd1 ukbd0 ad8 devctl net ttyd1.init ums0 ad8s1 devstat net1 ttyd1.lock urandom ad8s1a dgdb net2 ttyp0 usb ad8s1b dumpdev net3 ttyp1 usb0 ad8s1c fd net4 ttyv0 usb1 ad8s1d fido network ttyv1 usb2 ad8s1e fw0 nfs4 ttyv2 usb3 ad8s1f fw0.0 nfslock ttyv3 usb4 ata fwmem0 null ttyv4 usb5 atkbd0 fwmem0.0 pci ttyv5 usb6 audit geom.ctl ptyp0 ttyv6 usb7 console io ptyp1 ttyv7 xpt0 consolectl kbd0 random ttyv8 zero ctty kbd1 stderr ttyv9 cuad0 kbd2 stdin ttyva it is ad6, ad6s1, ad6s2, ad6s5? thanks |
|
#2
|
|||
|
|||
|
for view slices and partition type:
fdisk -p /dev/ad6 and then Code:
mount -o ro -t ext2fs /dev/ad6s1 /mnt or mount -o ro -t ext2fs /dev/ad6s2 /mnt |
|
#3
|
||||
|
||||
|
Try fdisk ad6 and fdisk ad8. That should show you the ext3 partition. If it's on the first disk it's probably ad6s1.
|
|
#4
|
||||
|
||||
|
Code:
# fdisk -p /dev/ad6 # /dev/ad6 g c969021 h16 s63 p 1 0x83 63 953409492 a 1 p 2 0x05 953409555 23358510 Code:
# fdisk ad6
******* Working on device /dev/ad6 *******
parameters extracted from in-core disklabel are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 131 (0x83),(Linux native)
start 63, size 953409492 (465531 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 5 (0x05),(Extended DOS)
start 953409555, size 23358510 (11405 Meg), flag 0
beg: cyl 1023/ head 254/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
So I suppose ad6s1 is the root / partition with ext2fs ad6s2 is the swap partition ad6s5 .... I don't know |
|
#5
|
||||
|
||||
|
well I tried:
Code:
# mount -o ro -t ext2fs /dev/ad6s1 /disc01/ # ls /disc01 ls: /disc01: Bad file descriptor # mount -o ro -t ext2fs /dev/ad6s2 /disc01/ mount: /disc01: Bad file descriptor |
|
#6
|
|||
|
|||
|
You need to apply this patch to your kernel sources and rebuild at least the ext2fs kernel module:
http://pastebin.ca/raw/1280738 The ext2fs kernel module currently available in -STABLE (and maybe -CURRENT) does not support inode sizes higher than 128, and many distributions now use 256. Adam |
|
#7
|
||||
|
||||
|
well after this I could not read the /disc01 directory (I created for mount point) so I restarted the system. A lot of numbers appear on the screen and finally "Giving up on 27 buffers". What does it means?
|
|
#8
|
||||
|
||||
|
Quote:
Thanks |
|
#9
|
||||
|
||||
|
Quote:
|
|
#10
|
||||
|
||||
|
Yes there is brd@ you can find it in here:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/124621 Here you can find the patch that I used: http://pflog.net/~floyd/ext2fs.diff mounting linux partitions Fri May 9 18:05:26 UTC 2008 http://lists.freebsd.org/pipermail/f...ay/174588.html bad file descriptor when mounting an ext2fs. Tue Jun 10 11:08:46 UTC 2008 http://lists.freebsd.org/pipermail/f...ne/176506.html mounting ext2fs partitions on FBSD7 ( third time a charm?) Fri Jul 4 23:33:53 UTC 2008 http://lists.freebsd.org/pipermail/f...ly/178219.html 256-byte inode support Sat Sep 6 23:46:33 UTC 2008 http://lists.freebsd.org/pipermail/f...er/025912.html ext2 inode size patch - RE: PR kern/124621 Mon Nov 24 11:29:59 PST 2008 http://lists.freebsd.org/pipermail/f...er/046758.html ext2 inode size patch - RE: PR kern/124621 Wed Dec 3 14:53:46 PST 2008 http://lists.freebsd.org/pipermail/f...er/046916.html I´ve had a conversation with Josh (email) and he kindly explained me how to apply the patch and test it. So far, so _good_ to me ... not a single problem on daily usage. Hope you find that info usefull ![]() Regards |
|
#11
|
||||
|
||||
|
Reading the above links I don't understand if it's possible or not to mount Linux volumes.
All my information are in Linux volume and I don't know how to transfer them in FreeBSD. I tried to mount the FreeBSD volume in Linux but no chance ...
|
|
#12
|
||||
|
||||
|
You can mount ext2/3fs as long as they have an "Inode size" equal to 128.
Otherwise (if "Inode size" equals 256), you won't be able to mount those ext2/3 partitions unless you apply Josh's patch. Or to be more spesific ... you will be able to mount them but you won't be able to acces the data on them .. and you'll get a "Bad file descriptor" every time you try to acces said mounted partition. In order to find out whether your ext2/3 partitions have a 128 or a 256 "Inode size", issue the following command as root: Code:
root@inferna:~ # tune2fs -l /dev/ad4s6 | grep "Inode size" Inode size: 256 At leas that was my experience .. Hope that helps
|
|
#13
|
||||
|
||||
|
Quote:
Code:
# tune2fs -l /dev/ad6s1 | grep "Inode size" tune2fs: Command not found. # whatis tune2fs tune2fs: nothing appropriate |
|
#14
|
||||
|
||||
|
Code:
[gonzalo@inferna ~]% which tune2fs /usr/local/sbin/tune2fs [gonzalo@inferna ~]% pkg_info -W /usr/local/sbin/tune2fs /usr/local/sbin/tune2fs was installed by package e2fsprogs-1.41.3 [gonzalo@inferna ~]% pkg_info -xqo e2fsprogs sysutils/e2fsprogs [gonzalo@inferna ~]%
|
| The Following 2 Users Say Thank You to gnemmi For This Useful Post: | ||
hirohitosan (December 13th, 2008), nhanquy (July 25th, 2009) | ||
|
#15
|
||||
|
||||
|
yes, it helps but unfortunately in my case:
Code:
tune2fs -l /dev/ad6s1 | grep "Inode size" Inode size: 256 |
|
#16
|
|||
|
|||
|
It's not too hard, really.
If you Code:
# cd /usr/src/sys/gnu/fs # patch < ~djn/ext2fs.diff (change to where you stored the patch, obviously) # cd /usr/src/sys/modules/ext2fs # make install clean If you have ext2fs compiled into the kernel (options EXT2FS) you would need to cd /usr/src ; make buildkernel installkernel to compile a new kernel. I doubt you have, though - it's not the default. |
|
#17
|
||||
|
||||
|
I don't have nothing in /usr/src
Code:
# ls -al /usr/src/ total 4 drwxr-xr-x 2 root wheel 512 Feb 24 2008 . drwxr-xr-x 17 root wheel 512 Dec 9 10:02 .. |
|
#18
|
||||
|
||||
|
You need to install the sources first ..
You can do so using "sysinstall" ... Code:
root@inferna:~ # sysinstall ![]() You should check the Handbook first though ... it's been a while since I don't use "sysinstall" so I might be wrong :s |
|
#19
|
||||
|
||||
|
Quote:
Code:
# cd /usr/src/sys/gnu/fs/ # patch < ~/ext2fs.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |diff -ud ext2fs.orig/ext2_fs.h ext2fs/ext2_fs.h |--- ext2fs.orig/ext2_fs.h 2005-06-16 06:51:38.000000000 +0000 |+++ ext2fs/ext2_fs.h 2008-09-03 14:10:27.000000000 +0000 -------------------------- Patching file ext2fs/ext2_fs.h using Plan A... Hunk #1 succeeded at 150. Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff -ud ext2fs.orig/ext2_inode.c ext2fs/ext2_inode.c |--- ext2fs.orig/ext2_inode.c 2006-09-26 04:15:58.000000000 +0000 |+++ ext2fs/ext2_inode.c 2008-09-03 13:54:49.000000000 +0000 -------------------------- Patching file ext2fs/ext2_inode.c using Plan A... Hunk #1 succeeded at 91. Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff -ud ext2fs.orig/ext2_vfsops.c ext2fs/ext2_vfsops.c |--- ext2fs.orig/ext2_vfsops.c 2008-04-03 18:51:13.000000000 +0000 |+++ ext2fs/ext2_vfsops.c 2008-09-03 13:55:37.000000000 +0000 -------------------------- Patching file ext2fs/ext2_vfsops.c using Plan A... Hunk #1 succeeded at 424. Hunk #2 succeeded at 578. Hunk #3 succeeded at 1013. done # cd /usr/src/sys/modules/ext2fs/ # make install clean install -o root -g wheel -m 555 ext2fs.ko /boot/kernel install: ext2fs.ko: No such file or directory *** Error code 71 |
|
#20
|
||||
|
||||
|
Try a:
Code:
root@inferna:/usr/src/sys/modules/ext2fs # make clean && make |
|
#21
|
||||
|
||||
|
I didn't understand the command so I paste it like this:
Code:
# /usr/src/sys/modules/ext2fs # make clean && make /usr/src/sys/modules/ext2fs: Permission denied. |
|
#22
|
||||
|
||||
|
are you doing this as root?
could you please do a "ls -a" inside that directory and paste the output in here? |
|
#23
|
||||
|
||||
|
hirohitosan, you should exec this this as root:
Code:
# cd /usr/src/sys/modules/ext2fs # make depend # make obj # make # make install # make unload # make load |
| The Following 2 Users Say Thank You to lme@ For This Useful Post: | ||
hirohitosan (December 16th, 2008), Voltar (July 26th, 2009) | ||
|
#24
|
||||
|
||||
|
Quote:
Code:
# make unload /sbin/kldunload -v ext2fs.ko kldunload: can't find file ext2fs.ko *** Error code 1 Stop in /usr/src/sys/modules/ext2fs. # make load /sbin/kldload -v /usr/obj/usr/src/sys/modules/ext2fs/ext2fs.ko Loaded /usr/obj/usr/src/sys/modules/ext2fs/ext2fs.ko, id=4 |
|
#25
|
||||
|
||||
|
thank you guys ... now I can mount the ext2 volume ... nice tutorial
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] Mounting a drive | xsiick | General | 30 | April 24th, 2009 17:16 |
| mounting devices | alxgomz | Peripheral Hardware | 7 | April 1st, 2009 08:35 |
| Mounting a harddrive | Roberth | General | 11 | January 20th, 2009 03:55 |
| ISCSI Mounting Help | Biker803 | System Hardware | 4 | December 4th, 2008 19:28 |
| ISCSI Mounting Help | Biker803 | General | 0 | December 3rd, 2008 20:04 |