9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Installing and partitioning for plan9
@ 2006-05-04 22:48 Lluís Batlle i Rossell
  2006-05-05  4:00 ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Lluís Batlle i Rossell @ 2006-05-04 22:48 UTC (permalink / raw)
  To: 9fans Mailing list

[-- Attachment #1: Type: text/plain, Size: 921 bytes --]

Hi,

I did my first installation of plan9 on real hardware (not qemu), and I 
found that the plan9 fdisk "broke" my partitions. I had some partitions, 
one of them was an Extended Partition (as Linux fdisk names). The 
partitions were not sorted according to disk layout. The first partition 
was after the second one, for example.

The plan9 fdisk, first, sorted the partitions according to disk layout 
(then, in Linux, in the same HD, the contents of /etc/fstab didn't match 
at all).

Secondly, the plan9 fdisk changed the Extended Partition to "Win 95 
Extended" (according to Linux fdisk naming). The partitions in the 
extended partition can still be seen, but according to a reiserfsck, the 
partition size of one of them had changed.

It's a pity that I don't have a copy of the old partition table to 
compare concretely...

Is that the expected behaviour of plan9 fdisk?

Thanks,
Lluís

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3311 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] Installing and partitioning for plan9
  2006-05-04 22:48 [9fans] Installing and partitioning for plan9 Lluís Batlle i Rossell
@ 2006-05-05  4:00 ` Russ Cox
  2006-05-05 23:43   ` [9fans] " Paweł Lasek
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2006-05-05  4:00 UTC (permalink / raw)
  To: 9fans

> Is that the expected behaviour of plan9 fdisk?

Not quite the expected behavior, but it's certainly believable.

Fdisk assumes that it can pick up the partition table
into its internal representation and then rewrite it from that
internal representation without breaking anything.
It never occurred to me that partitions might not be
listed in order (in prep, which fdisk is based on,
partition order is irrelevant and therefore always sorted!).

I'm also not too surprised about changing the type of
extended partition.  That shouldn't matter, of course.

Changing one of the partition sizes *is* surprising, 
since I tried very hard not to do that.

PC disk partitioning is a giant mess.  I've given up.
If you think you can fix the bugs without
introducing other problems, the source is in 
/sys/src/cmd/disk/prep/fdisk.c and I'd gladly 
accept a patch (see patch(1)).

Thanks for the report.
Russ



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [9fans] Re: Installing and partitioning for plan9
  2006-05-05  4:00 ` Russ Cox
@ 2006-05-05 23:43   ` Paweł Lasek
  2006-05-06  8:24     ` Lluís Batlle i Rossell
  0 siblings, 1 reply; 6+ messages in thread
From: Paweł Lasek @ 2006-05-05 23:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

PC MBR-style partition are _very_ often not sorted. It's the usual
situation if you had some repartitioning without changing the whole
disk structure (For example, changed only part of the disk) using *nix
fdisk - it preserves old partion numbers in order not to screw OS
booting (with MBR partition table, it's quite sensible thing to
do....)

But it's not only Plan9's fdisk bug, IIRC Windows 2000 Server did the
same to me (Or maybe it was something different), except that it only
changed partition numbering to sorted - The only thing I had to was to
boot from other medium and change /etc/fstab entries to match new
numbers.

On 5/5/06, Russ Cox <rsc@swtch.com> wrote:
> > Is that the expected behaviour of plan9 fdisk?
>
> Not quite the expected behavior, but it's certainly believable.
>
> Fdisk assumes that it can pick up the partition table
> into its internal representation and then rewrite it from that
> internal representation without breaking anything.
> It never occurred to me that partitions might not be
> listed in order (in prep, which fdisk is based on,
> partition order is irrelevant and therefore always sorted!).
>
> I'm also not too surprised about changing the type of
> extended partition.  That shouldn't matter, of course.
>
> Changing one of the partition sizes *is* surprising,
> since I tried very hard not to do that.
>
> PC disk partitioning is a giant mess.  I've given up.
> If you think you can fix the bugs without
> introducing other problems, the source is in
> /sys/src/cmd/disk/prep/fdisk.c and I'd gladly
> accept a patch (see patch(1)).
>
> Thanks for the report.
> Russ
>
>


--
Paul Lasek

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] Re: Installing and partitioning for plan9
  2006-05-05 23:43   ` [9fans] " Paweł Lasek
@ 2006-05-06  8:24     ` Lluís Batlle i Rossell
  2006-05-06 10:37       ` Glenn Holmer
  0 siblings, 1 reply; 6+ messages in thread
From: Lluís Batlle i Rossell @ 2006-05-06  8:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

Paweł Lasek wrote:
> PC MBR-style partition are _very_ often not sorted. It's the usual
> situation if you had some repartitioning without changing the whole
> disk structure (For example, changed only part of the disk) using *nix
> fdisk - it preserves old partion numbers in order not to screw OS
> booting (with MBR partition table, it's quite sensible thing to
> do....)
Yes, I agree. That's my situation in most of my computers.

I'll also add one thing... iirc, in the installation there was only one 
step for setting the "loader". I could not clearly understand whether it 
installed a bootstrap loader in the partition, or the MBR loader. I 
think in plan9 there are two diferent steps for that (prep & mbr), and 
iirc those are not separate steps in the installation.

Maybe I'm wrong, but I won't reinstall soon to check it :)

Thank you,
Lluís

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3311 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] Re: Installing and partitioning for plan9
  2006-05-06  8:24     ` Lluís Batlle i Rossell
@ 2006-05-06 10:37       ` Glenn Holmer
  2006-05-06 15:04         ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Holmer @ 2006-05-06 10:37 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Saturday 06 May 2006 03:24, Lluís Batlle i Rossell wrote:
> I'll also add one thing... iirc, in the installation there was only
> one step for setting the "loader". I could not clearly understand
> whether it installed a bootstrap loader in the partition, or the MBR
> loader.

I agree; it wasn't clear how to specify that the loader should go only 
in the partition's boot sector, although I did end up with a perfect 
install that GRUB could start.

P.S. The space bunny t-shirt was a big hit at work :)

-- 
Glenn Holmer (Linux registered user #16682)
"I love virtuosity.  I love danger."  -Pierre Boulez, 2005


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] Re: Installing and partitioning for plan9
  2006-05-06 10:37       ` Glenn Holmer
@ 2006-05-06 15:04         ` Russ Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Russ Cox @ 2006-05-06 15:04 UTC (permalink / raw)
  To: 9fans

> I agree; it wasn't clear how to specify that the loader should go only 
> in the partition's boot sector, although I did end up with a perfect 
> install that GRUB could start.

The partition boot sector *always* gets installed in the Plan 9 partition.
(Otherwise it wouldn't be a bootable partition.)

The questions are about setting up a way to get into that,
i.e. a master boot record or some such.

Russ



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-06 15:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 22:48 [9fans] Installing and partitioning for plan9 Lluís Batlle i Rossell
2006-05-05  4:00 ` Russ Cox
2006-05-05 23:43   ` [9fans] " Paweł Lasek
2006-05-06  8:24     ` Lluís Batlle i Rossell
2006-05-06 10:37       ` Glenn Holmer
2006-05-06 15:04         ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).