Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

Can I use a second solaris fdisk partition?

瀏覽次數:152 次
跳到第一則未讀訊息

Andreas Schulz

未讀,
2000年12月2日 晚上10:52:142000/12/2
收件者:
Hi all,

I have solaris 8 installed on my PC. To be exact on my 16 MB harddisk
on which I created a 8MB Solaris partition with Solaris fdisk.
Then I create normal unix partition on this 8Mb partition and install
Solaris.
Now I create a second Solaris partition on this harddisk with fdisk.
But how could I use this partition under Solaris?
There are no devices for this second partition.

Is it unchangable, if I first don't use the whole harddisk for Solaris
and later want to add a new fdisk partition?

Please help me with some hints!

Thanks in advance,

Bye
Andreas

Andrew Gabriel

未讀,
2000年12月3日 凌晨3:00:002000/12/3
收件者:
In article <90cg1d$m8h8$1...@id-63303.news.dfncis.de>,

fr...@localhost.eng.sun.com (Andreas Schulz) writes:
>Hi all,
>
>I have solaris 8 installed on my PC. To be exact on my 16 MB harddisk
>on which I created a 8MB Solaris partition with Solaris fdisk.
>Then I create normal unix partition on this 8Mb partition and install
>Solaris.
>Now I create a second Solaris partition on this harddisk with fdisk.
>But how could I use this partition under Solaris?
>There are no devices for this second partition.
>
>Is it unchangable, if I first don't use the whole harddisk for Solaris
>and later want to add a new fdisk partition?

You can only have a single Solaris fdisk partition per disk.
Actually, this is part of the original PC spec - only a single
fdisk partition of any one type is allowed. Consequently,
Solaris (and any SysV/386 conforming unix) doesn't provide
access to more than one fdisk partition (for unix filesystems
anyway).

There is a hack you can do to make other primary fdisk
partitions into single ufs filesystems, but it's a bit fiddly.
I've posted details a few times before - search deja.com if
you want to look up this.

--
Andrew Gabriel
Consultant Software Engineer


Philip Brown

未讀,
2000年12月3日 凌晨3:00:002000/12/3
收件者:
On 3 Dec 2000 10:47:04 GMT, and...@cucumber.demon.co.uk wrote:
>...

>There is a hack you can do to make other primary fdisk
>partitions into single ufs filesystems, but it's a bit fiddly.

what fiddly? I thought it was as simple as just using the raw
fdisk partition.

EG: if your solaris partition is fdisk partition 1, and you want to use
extra space in fdisk partition 2, you would use

newfs /dev/rdsk/c0d0f2
mount /dev/dsk/c0d0f2 /mnt


--
[Trim the no-bots from my address to reply to me by email!]
[ Do NOT email-CC me on posts. Pick one or the other.]
S.1618 http://thomas.loc.gov/cgi-bin/bdquery/z?d105:SN01618:@@@D
The word of the day is mispergitude

Andrew Gabriel

未讀,
2000年12月3日 凌晨3:00:002000/12/3
收件者:
In article <slrn92l7v9....@shell3.ba.best.com>,

phi...@bolthole.no-bots.com (Philip Brown) writes:
>On 3 Dec 2000 10:47:04 GMT, and...@cucumber.demon.co.uk wrote:
>>...
>>There is a hack you can do to make other primary fdisk
>>partitions into single ufs filesystems, but it's a bit fiddly.
>
>what fiddly? I thought it was as simple as just using the raw
>fdisk partition.
>
>EG: if your solaris partition is fdisk partition 1, and you want to use
>extra space in fdisk partition 2, you would use
>
>newfs /dev/rdsk/c0d0f2
>mount /dev/dsk/c0d0f2 /mnt

That just gets you some message like "No VTOC" (assuming you use
the correct device node names). Search back on deja.com for the
full method.

Philip Brown

未讀,
2000年12月3日 凌晨3:00:002000/12/3
收件者:
On 3 Dec 2000 20:47:31 GMT, and...@cucumber.demon.co.uk wrote:
>In article <slrn92l7v9....@shell3.ba.best.com>,
> phi...@bolthole.no-bots.com (Philip Brown) writes:
>>what fiddly? I thought it was as simple as just using the raw
>>fdisk partition.
>>
>>EG: if your solaris partition is fdisk partition 1, and you want to use
>>extra space in fdisk partition 2, you would use
>>
>>newfs /dev/rdsk/c0d0f2
>>mount /dev/dsk/c0d0f2 /mnt
>
>That just gets you some message like "No VTOC" (assuming you use
>the correct device node names).

how odd. If having a vtoc is a requirement, I wonder how
lofi works.

Andy

未讀,
2000年12月3日 晚上8:39:412000/12/3
收件者:
In article <90cg1d$m8h8$1...@ID-63303.news.dfncis.de>, and...@schulz-live.de wrote:
>Hi all,
>
>I have solaris 8 installed on my PC. To be exact on my 16 MB harddisk
>on which I created a 8MB Solaris partition with Solaris fdisk.
>Then I create normal unix partition on this 8Mb partition and install

8MB! Wow! What kind of file compression are you using?
:)

A

Yousuf Khan

未讀,
2000年12月4日 凌晨12:43:272000/12/4
收件者:
In article <90cg1d$m8h8$1...@ID-63303.news.dfncis.de>,
and...@schulz-live.de wrote:
> Hi all,
>
> I have solaris 8 installed on my PC. To be exact on my 16 MB harddisk
> on which I created a 8MB Solaris partition with Solaris fdisk.
> Then I create normal unix partition on this 8Mb partition and install
> Solaris.
> Now I create a second Solaris partition on this harddisk with fdisk.
> But how could I use this partition under Solaris?
> There are no devices for this second partition.

I'll assume all of those references to "MB" actually mean "GB".

Have you tried rescanning the device tree, especially the disk device
tree? That's usually done with a "touch /reconfigure" followed by a
system reboot. Or if you don't want to reboot, you can try the
following two commands:

drvconfig
disks

These two commands executed one after the other will rescan the device
tree for you.

Yousuf Khan


Sent via Deja.com http://www.deja.com/
Before you buy.

Yousuf Khan

未讀,
2000年12月4日 凌晨12:48:222000/12/4
收件者:
In article <90cg1d$m8h8$1...@ID-63303.news.dfncis.de>,
and...@schulz-live.de wrote:
> Is it unchangable, if I first don't use the whole harddisk for Solaris
> and later want to add a new fdisk partition?

Actually, after posting my last message to you, I went on Sunsolve and
found the following Infodoc 13142.

http://sunsolve.sun.com/private-cgi/retrieve.pl?doc=infodoc%
2F13142&zone_32=x86%20fdisk

Here's the text of the Infodoc:
-------------------------------

A single hard disk should contain only one active Solaris partition.
However,
it is possible to convert unpartitioned disk space on the same hard disk
for use with Solaris 2.x x86. Use the following procedure at your own
risk.
This is not guaranteed to work on all systems.

Instructions for making additional Unix file systems
----------------------------------------------------

You can have up to 4 fdisk partitions per hard drive, but only
one can be used for Solaris 2.x x86.

However, it is possible to create unix file systems on other fdisk
partitions that are mountable by Solaris 2.x x86. These partitions
cannot be subdivided into slices the way the main Solaris partition
is. You can have only one filesystem on each additional
fdisk partition.

WARNING: USE THIS PROCEDURE AT YOUR OWN RISK. IT IS NOT OFFICIALLY
TESTED OR DOCUMENTED. IF THERE IS AN ERROR IN YOUR CALCULATIONS YOU
COULD INADVERTENTLY DESTROY ADJACENT FDISK PARTITIONS.

fdisk /dev/rdsk/c#t#d#p0 (for a SCSI drive)
or
fdisk /dev/rdsk/c#d#p0 (for an IDE drive)

(where # is filled in for the device you are using)

Create a new partition of type "OTHER". Get the length from the length
field for this new partition. The following example uses partition #3
for Solaris 2.x x86 with a length of 515 cylinders.

-Take note of the cylinder size. The line for this info is worded:

"Cylinder size is 896 (512 byte) blocks"

-Now multiply the fdisk length (515) and cylinder size (896).

896 * 515 = 461440 bytes

-Create UNIX ufs filesystem on new partition

mkfs -F ufs /dev/rdsk/c#t#d#p3 461440 (for a SCSI drive)
or
mkfs -F ufs /dev/rdsk/c#d#p3 461440 (for an IDE drive)
^
|
Change this to whatever partition number is used.

Now you have a UFS file system that you can mount at /dev/dsk/c#t#d#p3
(for a SCSI drive) or /dev/dsk/c#d#p3 (for an IDE drive)

Philip Brown

未讀,
2000年12月4日 凌晨3:00:002000/12/4
收件者:
On Mon, 04 Dec 2000 05:48:22 GMT, yk...@my-deja.com wrote:
>...

> -Create UNIX ufs filesystem on new partition
>
>mkfs -F ufs /dev/rdsk/c#t#d#p3 461440 (for a SCSI drive)
>or
>mkfs -F ufs /dev/rdsk/c#d#p3 461440 (for an IDE drive)

Huh. So the only special preceedure needed is to look up the size of the
slice, in bytes.

How lazy of the person who wrote newfs for intel, considering that
ioctl( DKIOCPARTINFO) work just fine on c#d#p# devices .

Too bad that solaris fdisk doesnt bother to report size in blocks, instead
of just idiotic cylinders.

Oh.
I guess this is a good time to share my read-only version of fdisk, if you
want a quick-n-easy way of viewing this sort of thing under solaris, without
rebooting :-)

Output looks like the following:

# fdisk /dev/dsk/c0d0p0 (works on dsk OR rdsk)
Fdisk information for device /dev/dsk/c0d0p0
# start block end block startCylSecHd endCylSecHd OSType
1: 0000000063 0000112392 0/ 1/ 1 6/3f/fe DOS(HUGE)
2: 0000112455 0000208845 7/ 1/ 0 13/3f/fe DOS(Extended)
3: 0000321300 0001959930 14/ 1/ 0 8d/3f/fe LINUX Native
4: 0002281230 0000578340 8e/ 1/ 0 b1/3f/fe SOLARIS (/linuxswap)


http://www.bolthole.com/solaris/x86.html

has links to "getfdisk.c" and "getvtoc.c"

remember, 1 block always==512 bytes.

Mike Sullivan

未讀,
2000年12月4日 凌晨3:00:002000/12/4
收件者:

>On 3 Dec 2000 20:47:31 GMT, and...@cucumber.demon.co.uk wrote:
>>In article <slrn92l7v9....@shell3.ba.best.com>,
>> phi...@bolthole.no-bots.com (Philip Brown) writes:
>>>what fiddly? I thought it was as simple as just using the raw
>>>fdisk partition.
>>>
>>>EG: if your solaris partition is fdisk partition 1, and you want to use
>>>extra space in fdisk partition 2, you would use
>>>
>>>newfs /dev/rdsk/c0d0f2
>>>mount /dev/dsk/c0d0f2 /mnt
>>
>>That just gets you some message like "No VTOC" (assuming you use
>>the correct device node names).

>how odd. If having a vtoc is a requirement, I wonder how
>lofi works.

By faking one up. newfs doesn't care much, but it does want the vtoc
ioctl's to succeed.

Mike

Philip Brown

未讀,
2000年12月4日 凌晨3:00:002000/12/4
收件者:
On 4 Dec 2000 21:19:06 GMT, mik...@yavin.Sun.COM wrote:
>...

>>how odd. If having a vtoc is a requirement, I wonder how
>>lofi works.
>
>By faking one up. newfs doesn't care much, but it does want the vtoc
>ioctl's to succeed.

the better solution would have been to fix newfs, instead of hacking the
lofi driver.

Mike Sullivan

未讀,
2000年12月4日 晚上8:11:172000/12/4
收件者:

>On 4 Dec 2000 21:19:06 GMT, mik...@yavin.Sun.COM wrote:
>>...
>>>how odd. If having a vtoc is a requirement, I wonder how
>>>lofi works.
>>
>>By faking one up. newfs doesn't care much, but it does want the vtoc
>>ioctl's to succeed.

>the better solution would have been to fix newfs, instead of hacking the
>lofi driver.

Well, I should rephrase then. newfs wants to use the vtoc ioctls
so that it can figure out what parameters to give to mkfs. So it
needs some idea of the geometry of the "disk". For lofi, the exact
numbers don't matter much, so they just have to be right enough that
newfs works.

Mike

Philip Brown

未讀,
2000年12月4日 晚上8:48:052000/12/4
收件者:

That doesnt change the brokenness of newfs.
In fact, you just pointed out that it doesnt really matter what values
newfs is fed, because lofi fakes em, and it works.

So it would be nice if newfs just made something up, if the ioctl on
geometry wasn't available.

The irony is, the DKIOCGEOM ioctl IS AVAILABLE for c0d0p[01234], for
"geometry". and DKIOCPARTINFO can be used to get the size of the partition.
So there's no rational reason why newfs shouldn't support it natively.
It just doesn't right now.
Someone at sun should fix it. It should be trivial.

a_sc...@my-deja.com

未讀,
2000年12月5日 凌晨2:22:572000/12/5
收件者:
Hi all,

I will try this out.
Thanks.

Bye
Andreas

PS: Of course all MBs should be GBs!


In article <90fb75$8oh$1...@nnrp1.deja.com>,
Yousuf Khan <yk...@my-deja.com> wrote:
> In article <90cg1d$m8h8$1@ID-

an_s...@gmx.de

未讀,
2000年12月5日 凌晨3:00:002000/12/5
收件者:
Hi all,

So I try it out.
The length of the partition is 14902 with 1008 cylinders.
So I do the following comand and get the error:

# mkfs -F ufs /dev/rdsk/c0d1p3 15021216
Can not determine partition size: Invalid argument

Does anybody know, what I should do now?

Bye
Andreas


In article <90fb75$8oh$1...@nnrp1.deja.com>,
Yousuf Khan <yk...@my-deja.com> wrote:

Andrew Gabriel

未讀,
2000年12月5日 凌晨3:00:002000/12/5
收件者:
In article <90jna0$q8b$1...@nnrp1.deja.com>,

an_s...@gmx.de writes:
>Hi all,
>
>So I try it out.
>The length of the partition is 14902 with 1008 cylinders.
>So I do the following comand and get the error:
>
># mkfs -F ufs /dev/rdsk/c0d1p3 15021216
>Can not determine partition size: Invalid argument

What does this report...

fdisk -W /dev/fd/1 /dev/rdsk/c0d1p0

--
Andrew Gabriel And...@cucumber.demon.co.uk
Consultant Software Engineer


0 則新訊息