Raw device name to use with mkfs - Solaris
This is a discussion on Raw device name to use with mkfs - Solaris ; By reading the Solaris 10 device management document:
http://docs.sun.com/app/docs/doc/817-5093?a=load
it was not completely clear to me what is the correct raw device name
to use if I want to create a FAT32 file system on the partition listed
as 3 ...
-
Raw device name to use with mkfs
By reading the Solaris 10 device management document:
http://docs.sun.com/app/docs/doc/817-5093?a=load
it was not completely clear to me what is the correct raw device name
to use if I want to create a FAT32 file system on the partition listed
as 3 in the Solaris fdisk output shown below while keeping the
data in partitions 1 and 2 in tact. This is for Solaris 10 on x86.
On the disk c0d0 I would like to do something like
mkfs -F pcfs /dev/rdsk/
mount -F pcfs /dev/dsk/ /mnt/scratch
Ideally I would have preferred to make the partition a UFS system
but apparently you cannot have more than one file system
of any given type on the same disk and I already have a UFS
system on partition 2.
Would appreciate any help.
Total disk size is 38811 cylinders
Cylinder size is 2016 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 IFS: NTFS 0 10160 10161 26
2 Active Solaris2 10351 24383 14033 36
3 Win95 FAT32 24535 37900 13366 34
-
Re: Raw device name to use with mkfs
Andrew Gabriel wrote:
> :
>
> I'm afraid you're going to bump up against a bug here. What you
> should be able to do is to turn partition 3 into a raw ufs
> filesystem without any Solaris labelling or slices in the partition.
> Unfortunately, this got broken in Solaris 8, and still is AFAIK.
> If you can temporarily grab a copy of /usr/lib/fs/ufs/mkfs from
> a Solaris x86 2.6 or 7 system and drop it onto your system
Thanks for your suggestion. Unfortunately, I don't have any
2.6-7 distribution and it looks like Sun does not provide older
Solaris x86 distributions available for download.
The Solaris partition/slice concepts seem to be a mess in the x86
system and is definitely not as flexible as Linux.
I just want to be able to create any file system on Partition 3
so I can use the rest of the disk without having to reformat the entire
disk. Maybe I could experiment with Linux fdisk/mkfs by booting
a Knoppix Linux, which does not require hard disk.
Partition Status Type Start End Length %
========= ====== ============ =====
1 IFS: NTFS 0 10160 10161 26
2 Active Solaris2 10351 24383 14033 36
3 Win95 FAT32 24535 37900 13366 34
-
Re: Raw device name to use with mkfs
In article <1142153937.300785.51950@i40g2000cwc.googlegroups.c om>,
"KarlD" writes:
> I just want to be able to create any file system on Partition 3
If you just want _any_ filesystem, use the DOS one that's there...
mount -F pcfs /dev/dsk/c0d0p0:1 /mnt
> so I can use the rest of the disk without having to reformat the entire
> disk. Maybe I could experiment with Linux fdisk/mkfs by booting
> a Knoppix Linux, which does not require hard disk.
--
Andrew Gabriel
-
Re: Raw device name to use with mkfs
Andrew Gabriel wrote:
> In article <1142153937.300785.51950@i40g2000cwc.googlegroups.c om>,
> "KarlD" writes:
> > I just want to be able to create any file system on Partition 3
>
> If you just want _any_ filesystem, use the DOS one that's there...
> mount -F pcfs /dev/dsk/c0d0p0:1 /mnt
Yes, an already existing file system could be mounted directly
but I don't have a FAT file system yet. Partition 3 is only what I
have set up in fdsk and it has not been not formatted yet. I
could set it to any partition type.
I would image I need to create a file system using mkfs -F pcfs or
newfs before I can mount.
-
Re: Raw device name to use with mkfs
Andrew Gabriel wrote:
>
> Well, I never tried it on a hard drive, but something like this
> should work in theory...
>
> mkfs -v -F pcfs -o fat=32,nofdisk,size=`expr 2016 \* 13366` /dev/rdsk/c0d0p3
Andrew, thanks a lot, it did work fine on my Solaris 10, Now I can
use the remainder 13G of the disk.
In summary, the task was to create a new pcfs file system on a
partition of a disk that already had a Solaris and Windows NT
partition.
# mkfs -F pcfs -o fat=32,nofdisk,size=26945856 /dev/rdsk/c0d0p3
# mkdir /export/part3
# mount -F pcfs /dev/dsk/c0d0p3 /export/part3
% cd /export/part3
% vi test_file
The size argument to mkfs (in pcfs mode) is in 512 Byte blocks
calculated as you showed:
size=2016 * 13366 (# cylinders) = 26945856
Below is the fdisk partition table of my disk
Total disk size is 38811 cylinders
Cylinder size is 2016 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ =====
1 IFS: NTFS 0 10160 10161 26
2 Active Solaris2 10351 24383 14033 36
3 Win95 FAT32 24535 37900 13366 34
-
Re: Raw device name to use with mkfs
Andrew Gabriel wrote:
> In article <1142198603.073413.88080@j33g2000cwa.googlegroups.c om>,
> "KarlD" writes:
>> Andrew Gabriel wrote:
>>> In article <1142153937.300785.51950@i40g2000cwc.googlegroups.c om>,
>>> "KarlD" writes:
>>>> I just want to be able to create any file system on Partition 3
>>> If you just want _any_ filesystem, use the DOS one that's there...
>>> mount -F pcfs /dev/dsk/c0d0p0:1 /mnt
>> Yes, an already existing file system could be mounted directly
>> but I don't have a FAT file system yet. Partition 3 is only what I
>> have set up in fdsk and it has not been not formatted yet. I
>> could set it to any partition type.
>> I would image I need to create a file system using mkfs -F pcfs or
>> newfs before I can mount.
>
> Well, I never tried it on a hard drive, but something like this
> should work in theory...
>
> mkfs -v -F pcfs -o fat=32,nofdisk,size=`expr 2016 \* 13366` /dev/rdsk/c0d0p3
>
You could also use Disk Management (XP) to format it, and/or make other
changes.
1. Start->Control Panel->Performance and Maintainence->Computer Management
2. Then select Disk Management on the left side. The display will change
to a GUI display on the right side. Each disk will be displayed as a
horizontal picture, with each partition or unallocated space displayed.
3. Right click on the fat32 partition, and from the drop-down menu
select format. A pop-up window will open for you to select the format
type and parameters. Format the partition and make whatever changes you
need to. (READ the caution below before trying this!)
*CAUTION* You can perform several other functions in the drop-down menu,
some of which could get you into trouble! DO not change the "Active"
partition-you CANNOT change it back to Solaris/GRUB using the GUI/Disk
Management method, and will not be able to boot Solaris again without
going to the Command Prompt and using the DISKPART command to undo the
change. I'll post another thread about upgrading my laptop's disk and
where things went wrong!
Gary