DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 21st October 2017
gustaf gustaf is offline
Fdisk Soldier
 
Join Date: Dec 2016
Posts: 69
Default Add partition to disk ?

Hello everyone,

I'm trying to partition the unallocated space on a disk.

I have created a bootable USB stick which contains two partitions and a vast amount of unallocated space:

Code:
$ dmesg

sd1 at scsibus4 targ 1 lun 0: <Lexar, USB Flash Drive, 1100> SCSI2 0/direct removable serial.05dca81d3020YVD48SBQ
sd1: 7646MB, 512 bytes/sector, 15659008 sectors
Code:
$ fdisk sd1

Disk: sd1       geometry: 974/255/63 [15659008 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: EF      0   1   2 -      0  16  16 [          64:         960 ] EFI Sys     
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
*3: A6      0  16  17 -     45 227  54 [        1024:      736256 ] OpenBSD
Code:
$ disklabel sd1

# /dev/rsd1c:
type: vnd
disk: vnd device
label: fictitious
duid: 9e5b01f8dc3ea3f3
flags:
bytes/sector: 512
sectors/track: 100
tracks/cylinder: 1
sectors/cylinder: 100
cylinders: 7382
total sectors: 15659008
boundstart: 1024
boundend: 737280
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:           736256             1024  4.2BSD   2048 16384 16142 
  c:         15659008                0  unused                    
  i:              960               64   MSDOS
I would like to create an additional 4.2BSD formatted partition so I can use this space for storing other files. This new partition should use the entire unallocated space.

I think I need to do something like the following:
Code:
$ doas disklabel -E sd1

Label editor (enter '?' for help at any prompt)
>p
OpenBSD area: 1024-737280; size: 736256; free: 0
#                size           offset  fstype [fsize bsize   cpg]
  a:           736256             1024  4.2BSD   2048 16384 16142 
  c:         15659008                0  unused                    
  i:              960               64   MSDOS                    
> r
Total free sectors: 0.
> a j
No space left, you need to shrink a partition
> x
Which partition do I shrink and how do I shrink it? The only one to shrink is 'c' -- the entire disk??

Or is this the wrong approach?

Many thanks to anyone who can help.
Reply With Quote
 


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
Install OpenBSD in more than one disk partition? betweendayandnight OpenBSD Installation and Upgrading 6 17th July 2015 05:51 PM
add another partition? amandus FreeBSD General 2 11th June 2013 02:51 PM
disk partition layout advise Fred974 FreeBSD Installation and Upgrading 14 8th November 2011 12:10 PM
Partition help needed. ros2468 OpenBSD Installation and Upgrading 9 22nd March 2010 01:25 PM
Disk geometry for Seagate disk phreud FreeBSD Installation and Upgrading 5 8th November 2008 10:51 PM


All times are GMT. The time now is 08:29 AM.


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