DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th November 2015
notooth notooth is offline
Shell Scout
 
Join Date: Jul 2015
Posts: 125
Default Cannot see ext4 partitions

Hi everyone,

I cannot see the ext4 partitions on my HDD. Please help.
[pre]
HTML Code:
$ sudo disklabel sd1 
# /dev/rsd1c:
type: unknown
disk: ST2000LM003 HN-
label: 
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 3876021
total sectors: 3907029168
boundstart: 0
boundend: 0
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:       3907029168                0  unused                   
  d:       3907029168                0  unused                   
  e:       1999997953             2048  4.2BSD      0     0    0 
  f:       1907028144       2000001024     ccd     
[/pre]
Reply With Quote
  #2   (View Single Post)  
Old 18th November 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Please post the output of $ sudo fdisk sd1 for us.
Reply With Quote
  #3   (View Single Post)  
Old 18th November 2015
notooth notooth is offline
Shell Scout
 
Join Date: Jul 2015
Posts: 125
Default

Here it is:
<pre>
HTML Code:
$ sudo fdisk sd1
Password: 
Disk: sd1       geometry: 258401/240/63 [3907029168 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 83      0  32  33 - 132275  47  63 [        2048:  1999998976 ] Linux files*
 1: 07 132275  48   1 - 258401  95  63 [  2000001024:  1907028144 ] NTFS        
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused    
</pre>
Reply With Quote
  #4   (View Single Post)  
Old 18th November 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

I assume you're now using OpenBSD, as you posted in an OpenBSD subforum.

The disklabel does not match the MBR partition table. You must either manually edit the disklabel to match, or you must have OpenBSD disregard the disklabel on disk so that OpenBSD will re-read the MBR table and re-create a disklabel based on the MBR. For the latter, please see the -d option in the disklabel(8) man page.
Reply With Quote
  #5   (View Single Post)  
Old 18th November 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

In case I was not clear:
  • You have a disklabel on the drive, which does NOT match your MBR partition table.
  • To replace that disklabel with one that does, you merely need to use the -d option (ignore the on-disk label) and the -w option to write a standard disklabel. If there is an MBR on the drive ... and there is, the MBR table will be used to create the disklabel partitions.
Therefore, use # disklabel -dw sd1 and as if by magic, your new disklabel will look something like this:
Code:
#                size           offset  fstype [fsize bsize  cpg]
  c:       3907029168                0  unused                   
  i:       1999998976             2048  ext2fs                   
  j:       1907028144       2000001024    NTFS
Reply With Quote
  #6   (View Single Post)  
Old 19th November 2015
notooth notooth is offline
Shell Scout
 
Join Date: Jul 2015
Posts: 125
Default

Hi jggimi,

I followed your guide:
Code:
$ sudo disklabel -dw sd1

$ sudo disklabel sd1
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: ST2000LM003 HN-M
duid: c1747308bf9d28ef
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 240
sectors/cylinder: 15120
cylinders: 258401
total sectors: 3907029168
boundstart: 0
boundend: 3907029168
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:       3907029168                0  unused                   
  i:       1999998976             2048  ext2fs                   
  j:       1907028144       2000001024    NTFS                   

$ sudo mount -t ext2fs /dev/sd1i /mnt/Storage1
mount_ext2fs: /dev/sd1i on /mnt/Storage1: Read-only file system
I could not mount the Read-only file system
Reply With Quote
  #7   (View Single Post)  
Old 19th November 2015
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,132
Default

As far as I know OpenBSD can only mount ext2fs and ext3fs.

ext3fs is ext2fs with added journalling. If an ext3fs filesystem is not mounted and/or used by Linux then OpenBSD can use it. The journal will be ignored.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #8   (View Single Post)  
Old 19th November 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

EXT 4 must be mounted read-only.
Quote:
9.5 - Accessing your Linux files from OpenBSD

OpenBSD supports the EXT2 file system for read/write, and can read EXT4. For further information, see FAQ 14.
Try using "-r" on the mount(8) command.
Reply With Quote
  #9   (View Single Post)  
Old 19th November 2015
notooth notooth is offline
Shell Scout
 
Join Date: Jul 2015
Posts: 125
Default

I can mount it now. Thank you very much
Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Partitions layout: Who is right? punk0x29a FreeBSD General 6 27th May 2013 06:45 PM
making many partitions jgisme FreeBSD Installation and Upgrading 1 23rd August 2012 06:27 PM
a question on partitions daemonfowl OpenBSD General 3 15th March 2012 01:46 PM
BSD partitions and stuff desreguard OpenBSD General 3 30th August 2011 08:00 PM
partitions italogf FreeBSD Installation and Upgrading 5 7th July 2008 12:14 PM


All times are GMT. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick