[9fans] something evil happening when partitioning a hdd with theplan9 installer - Plan9

This is a discussion on [9fans] something evil happening when partitioning a hdd with theplan9 installer - Plan9 ; Hi all! This is my first message, so please don't bash me too hard for my ignorance! I just got a shiny new dell inspiron 640m notebook. It has a core2duo processor, 2 gigs of RAM and a 120gig hdd. ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: [9fans] something evil happening when partitioning a hdd with theplan9 installer

  1. [9fans] something evil happening when partitioning a hdd with theplan9 installer

    Hi all!
    This is my first message, so please don't bash me too hard for my
    ignorance!
    I just got a shiny new dell inspiron 640m notebook. It has a core2duo
    processor, 2 gigs of RAM and a 120gig hdd. The first thing I did, after
    installing linux on it was to try plan9. I was amazed that the
    installer actually started up on this brand new system, but eh, plan9
    is a modern operating system, I guess
    The problem was that dell shipped that laptop with more than 12 gigs
    reserved for the windows restore thing and other various stuff on 4
    partitions, so I hardly had any primary partitions to use. My first try
    was to install plan9 on a secondary partition (yes, rtfm!!!), which was
    a very stupid thing to do, nevertheless the partition table got messed
    with really bad. I mean, I could hardly recover my linux root partition
    from the 6 partitions I had on the disk. The rest got wiped.
    Okay, I thought, what a blunder, I wont miss that one again. So I wiped
    my disk clean, and repartitioned now without all the dell partitions, so
    I had my first partition reserved for plan9. I just got to the point of
    installing plan9 on the machine again, so I loaded the plan9 cd in and
    booted it (from april 4th 2007). I created the plan9 partition at the
    beginning, where I reserved 3 gigs for it when reinstalling my system.
    Okay, I thought, I got through the partitioning part with no problem, I
    also subdivided my partition and mounted the fossil partition. Then I
    thought I would check out what happened, and reboot my system into
    linux. I know cfdisk is one of the most sensitive partitioning
    tools, so I fired it up, and, to my joy, it spat an error message at
    me. Actually, the same one as the one I got before.The error was
    partition 4 extends past end of disk. I think partition 4 was my
    extended partition, but I did not really see anything strange, I
    checked the cylinders, but it looked like partition 4's end was the
    last cylinder of the disk, so I didn't really understand, the same
    thing happened before, when I installed it on an extended partition:
    the partition table lloked fine, but cfdisk would complain, and my
    system would get unbootable.
    Sorry for the length of the message.
    cheers!
    John

  2. Re: [9fans] something evil happening when partitioning a hdd with theplan9 installer

    On 4/9/07, John Soros wrote:

    [cut]

    In this case, I'd recommend repartitioning with plain linux fdisk and
    reserve a partition for plan9 using it (Set partition type to plan9,
    you can check the number using built-in help IIRC), then during plan9
    installation just choose that partition and tell plan9 fdisk to don't
    write anything.

    And somebody ought to make plan9 bootable from something other than
    primary partition (The same problem I have with Solaris 10. I could
    use those 70 GB of hdd in my school computer, but there are not enough
    primary partition numbers left for it's disklabel...)


    --
    Paul Lasek

  3. Re: [9fans] something evil happening when partitioning a hdd with theplan9 installer

    John,

    Several things are odd about this. I do in fact have plan9 installed
    on an extended partition on a Dell laptop, so I know it can be done.
    Here a few things to check:

    1) Do your BIOS, linux and plan9 all agree about the number of
    cylinders, heads and sectors on the disk? I once had similar
    problems when NetBSD and FreeBSD saw different disk geometries.
    On reboot the disk appeared to have been wiped. In fact,
    everything was still there, but the partition table in the
    MBR was messed up.

    2) Whose boot loader are you using? Personally, I use GAG. Noone
    ever seems to recommend it, but I've never had any problems. It
    can boot from extended partitions or other disks.

    3) Is your disk IDE or SATA? Plan9 still has problems with SATA
    sometimes.

    John

    > Hi all!
    > This is my first message, so please don't bash me too hard for my
    > ignorance!
    > I just got a shiny new dell inspiron 640m notebook. It has a core2duo
    > processor, 2 gigs of RAM and a 120gig hdd. The first thing I did, after
    > installing linux on it was to try plan9. I was amazed that the
    > installer actually started up on this brand new system, but eh, plan9
    > is a modern operating system, I guess
    > The problem was that dell shipped that laptop with more than 12 gigs
    > reserved for the windows restore thing and other various stuff on 4
    > partitions, so I hardly had any primary partitions to use. My first try
    > was to install plan9 on a secondary partition (yes, rtfm!!!), which was
    > a very stupid thing to do, nevertheless the partition table got messed
    > with really bad. I mean, I could hardly recover my linux root partition
    > from the 6 partitions I had on the disk. The rest got wiped.
    > Okay, I thought, what a blunder, I wont miss that one again. So I wiped
    > my disk clean, and repartitioned now without all the dell partitions, so
    > I had my first partition reserved for plan9. I just got to the point of
    > installing plan9 on the machine again, so I loaded the plan9 cd in and
    > booted it (from april 4th 2007). I created the plan9 partition at the
    > beginning, where I reserved 3 gigs for it when reinstalling my system.
    > Okay, I thought, I got through the partitioning part with no problem, I
    > also subdivided my partition and mounted the fossil partition. Then I
    > thought I would check out what happened, and reboot my system into
    > linux. I know cfdisk is one of the most sensitive partitioning
    > tools, so I fired it up, and, to my joy, it spat an error message at
    > me. Actually, the same one as the one I got before.The error was
    > partition 4 extends past end of disk. I think partition 4 was my
    > extended partition, but I did not really see anything strange, I
    > checked the cylinders, but it looked like partition 4's end was the
    > last cylinder of the disk, so I didn't really understand, the same
    > thing happened before, when I installed it on an extended partition:
    > the partition table lloked fine, but cfdisk would complain, and my
    > system would get unbootable.
    > Sorry for the length of the message.
    > cheers!
    > John

    --
    John Stalker
    School of Mathematics
    Trinity College Dublin
    tel +353 1 896 1983
    fax +353 1 896 2282

  4. Re: [9fans] something evil happening when partitioning a hdd withthe plan9 installer

    I use http://btmgr.sourceforge.net/

    It can trick the OS a bit

    "
    Swapping driver ID
    Smart BootManager can boot most operating systems from not only the
    first hard disk but also others. If you have more than one hard disk in
    a computer and run different operating systems on each, this feature is
    very useful.
    "

    Another useful tool is the gparted linux boot disk

    http://gparted.sourceforge.net/

    It can even resize existing partitions for certain partition types (not
    BSD , not tried plan9)


  5. Re: [9fans] something evil happening when partitioning a hdd with theplan9 installer

    One more thought. Perhaps your partition numbering is getting screwed
    up. Linux, and other UNIX clones, will get confused if you insert
    new extended partitions, because you bump up the numbers of those that
    follow. Plan9 avoids this silliness for the most part, but has another
    annoying habit. If, for some reason, your partitions are out of order on
    the disk, e.g. the third one is before the second, plan9 will "helpfully"
    reorder them in the partition table in the MBR. This isn't actually
    wrong, but it can certainly be hard to diagnose the resulting problems
    if you don't know that it is happening.

    > Hi all!
    > This is my first message, so please don't bash me too hard for my
    > ignorance!
    > I just got a shiny new dell inspiron 640m notebook. It has a core2duo
    > processor, 2 gigs of RAM and a 120gig hdd. The first thing I did, after
    > installing linux on it was to try plan9. I was amazed that the
    > installer actually started up on this brand new system, but eh, plan9
    > is a modern operating system, I guess
    > The problem was that dell shipped that laptop with more than 12 gigs
    > reserved for the windows restore thing and other various stuff on 4
    > partitions, so I hardly had any primary partitions to use. My first try
    > was to install plan9 on a secondary partition (yes, rtfm!!!), which was
    > a very stupid thing to do, nevertheless the partition table got messed
    > with really bad. I mean, I could hardly recover my linux root partition
    > from the 6 partitions I had on the disk. The rest got wiped.
    > Okay, I thought, what a blunder, I wont miss that one again. So I wiped
    > my disk clean, and repartitioned now without all the dell partitions, so
    > I had my first partition reserved for plan9. I just got to the point of
    > installing plan9 on the machine again, so I loaded the plan9 cd in and
    > booted it (from april 4th 2007). I created the plan9 partition at the
    > beginning, where I reserved 3 gigs for it when reinstalling my system.
    > Okay, I thought, I got through the partitioning part with no problem, I
    > also subdivided my partition and mounted the fossil partition. Then I
    > thought I would check out what happened, and reboot my system into
    > linux. I know cfdisk is one of the most sensitive partitioning
    > tools, so I fired it up, and, to my joy, it spat an error message at
    > me. Actually, the same one as the one I got before.The error was
    > partition 4 extends past end of disk. I think partition 4 was my
    > extended partition, but I did not really see anything strange, I
    > checked the cylinders, but it looked like partition 4's end was the
    > last cylinder of the disk, so I didn't really understand, the same
    > thing happened before, when I installed it on an extended partition:
    > the partition table lloked fine, but cfdisk would complain, and my
    > system would get unbootable.
    > Sorry for the length of the message.
    > cheers!
    > John

    --
    John Stalker
    School of Mathematics
    Trinity College Dublin
    tel +353 1 896 1983
    fax +353 1 896 2282

  6. Re: [9fans] something evil happening when partitioning a hdd withthe plan9 installer

    Thanks, pavel.

    On Mon, 9 Apr 2007 11:20:22 +0200
    "Paweł Lasek" wrote:

    > On 4/9/07, John Soros wrote:
    >
    > [cut]
    >
    > In this case, I'd recommend repartitioning with plain linux fdisk and
    > reserve a partition for plan9 using it (Set partition type to plan9,
    > you can check the number using built-in help IIRC), then during plan9
    > installation just choose that partition and tell plan9 fdisk to don't
    > write anything.

    Yes, this definitely got me closer. I didn't know linux fdisk knew about plan9 type partitions.

    >
    > And somebody ought to make plan9 bootable from something other than
    > primary partition (The same problem I have with Solaris 10. I could
    > use those 70 GB of hdd in my school computer, but there are not enough
    > primary partition numbers left for it's disklabel...)
    >
    >


    This got me a bit closer to having plan9 work on my system, as I succeded in installing it without having my partitions played with, but then came thebootsetup step. Here, the first time I simply pressed ctrl-d and rebooted the computer, but it seems that step has to be finished in order to get a 9fat partition set up with 9load, plan9.ini and the kernel, so I booted up the CD and quickly went through the bootsetup phase, selecting plan9 boot method, and selecting not to install into the mbr.

    Here, when I rebooted, again, my partition table was wrong, the extended partition got messed with somehow, and reached 1 cylinder outside the phisical limit. Of course this did not make my system unbootable, but it's still queer though, that that last bootsetup phase, which shouldn't have messed with my partition table (I did not even install to the mbr), changed my extended partition.

    Also, I still can not boot plan9 from grub for some odd reason. I tells me it can't bot the system.
    Plan9 is on the /dev/sda1 partition, and here is how I am trying to boot itin grub:

    root (hd0,0)
    chainloader +1
    boot

    I also tried putting rootnoverify instead of root, but it doesn't work either, and I also tried the makeactive option after root (hd0,0), but again, no avail.
    Thanks for the replies!
    Johnny

  7. Re: [9fans] something evil happening when partitioning a hdd withthe plan9 installer

    Okay, now plan9 is working on my laptop, here is how I did it:
    I made a primary partition for plan9 in lunix, then I used fdisk to set thepartition type to plan9
    (this is the only partitioning program that know plan9 type partitions).

    After this all went pretty easily, I installed the standard way from cdrom,I just didn't do any
    partitioning as that was already done.

    For the bootsetup step I selected plan9 way of booting, and at the questionwether to install plan9
    loader to the MBR I answered No.

    Now I can boot plan9 on the primary partition #1 from grub like so:

    title Plan9 from outer space
    root (hd0,0)
    chainloader +1
    boot

    Thanks for all the replies, and all the suggestions.
    Cheers to all plan9 users!
    I there's any plan9 users in Hungary, I'd be very happy to meet them!
    John


    On Mon, 9 Apr 2007 11:20:22 +0200
    "Paweł Lasek" wrote:

    > On 4/9/07, John Soros wrote:
    >
    > [cut]
    >
    > In this case, I'd recommend repartitioning with plain linux fdisk and
    > reserve a partition for plan9 using it (Set partition type to plan9,
    > you can check the number using built-in help IIRC), then during plan9
    > installation just choose that partition and tell plan9 fdisk to don't
    > write anything.
    >
    > And somebody ought to make plan9 bootable from something other than
    > primary partition (The same problem I have with Solaris 10. I could
    > use those 70 GB of hdd in my school computer, but there are not enough
    > primary partition numbers left for it's disklabel...)
    >
    >


  8. Re: [9fans] something evil happening when partitioning a hdd with theplan9 installer

    > I made a primary partition for plan9 in lunix, then I used fdisk to set the=
    > partition type to plan9
    > (this is the only partitioning program that know plan9 type partitions).


    Not true

    # uname -a
    FreeBSD okapi.maths.tcd.ie 6.2-STABLE FreeBSD 6.2-STABLE #1: Mon Apr 9 00:24:39 IST 2007 root@okapi.maths.tcd.ie:/usr/obj/usr/src/sys/USBDEBUG i386
    # grep plan9 /usr/src/sbin/fdisk/fdisk.c
    ,{0x39, "plan9"}

    --
    John Stalker
    School of Mathematics
    Trinity College Dublin
    tel +353 1 896 1983
    fax +353 1 896 2282

  9. Re: [9fans] something evil happening when partitioning a hdd withthe plan9 installer

    John Soros wrote:
    > Okay, now plan9 is working on my laptop, here is how I did it: I made a
    > primary partition for plan9 in lunix, then I used fdisk to set the partition
    > type to plan9 (this is the only partitioning program that know plan9 type
    > partitions).


    It may be the only one you have used that correctly reports them as Plan9, but
    it is by no means the only one that can create and manipulate a Plan9 partion.

    All that FreeBSD's toolset needs is the correct decimal or hex partion type code
    to effect that. Not hard to then hack and re-assemble boot0 so that it then
    reports them correctly as 'Plan9' in the multi-boot choices.

    >
    > After this all went pretty easily, I installed the standard way from cdrom, I
    > just didn't do any partitioning as that was already done.
    >
    > For the bootsetup step I selected plan9 way of booting, and at the question
    > wether to install plan9 loader to the MBR I answered No.
    >
    > Now I can boot plan9 on the primary partition #1 from grub like so:
    >
    > title Plan9 from outer space root (hd0,0) chainloader +1 boot
    >
    > Thanks for all the replies, and all the suggestions. Cheers to all plan9
    > users! I there's any plan9 users in Hungary, I'd be very happy to meet them!
    > John


    boot0 - combined with the 'as issued' Plan9 '9fat' loading tools, does that
    reasonably well w/o grub or Lilo. The advantage is that it is less sensitive to
    whether the HDD in question is still in the same relative position as when first
    installed to (which ordinarily requires editing lilo.conf or grub's menu.lst).

    Not ordinarily an issue with single-HDD laptops, but perhaps worht a look
    if/as/when Plan9 might have been installed to an external HDD.

    >
    >
    > On Mon, 9 Apr 2007 11:20:22 +0200 "Paweł Lasek"
    > wrote:
    >
    >> On 4/9/07, John Soros wrote:
    >>
    >> [cut]
    >>
    >> In this case, I'd recommend repartitioning with plain linux fdisk and
    >> reserve a partition for plan9 using it (Set partition type to plan9, you
    >> can check the number using built-in help IIRC), then during plan9
    >> installation just choose that partition and tell plan9 fdisk to don't write
    >> anything.
    >>
    >> And somebody ought to make plan9 bootable from something other than primary
    >> partition (The same problem I have with Solaris 10. I could use those 70 GB
    >> of hdd in my school computer, but there are not enough primary partition
    >> numbers left for it's disklabel...)
    >>
    >>

    >


    I have not yet attempted booting Plan9 from an 'extended' partition, but have
    been able to use block-mode loaders to start it from a 'primary' partition
    (slice) on a 200 GB HDD that was otherwise out of the reach of the BIOS (3 older
    MB tested, some with 1999 vintage BIOS).

    It should be equally possible to start Plan9 from a non-primary partition -
    perhaps the real issue is not 'reaching' it, but whether it can understand where
    it is and finish the boot?

    The FAT-within-Plan9-fs-type toolset Plan9 uses is still one of the most
    flexible ways of getting up and running.

    It shouldn't take much to keep that approach compatible with progressively newer
    hardware and boot loaders.

    Bill Hacker

  10. Re: [9fans] something evil happening when partitioning a hdd with theplan9 installer

    >> And somebody ought to make plan9 bootable from something other than primary
    >> partition (The same problem I have with Solaris 10. I could use those 70 GB
    >> of hdd in my school computer, but there are not enough primary partition
    >> numbers left for it's disklabel...)

    >
    > I have not yet attempted booting Plan9 from an 'extended' partition, but have
    >
    > been able to use block-mode loaders to start it from a 'primary' partition
    > (slice) on a 200 GB HDD that was otherwise out of the reach of the BIOS (3 ol
    > der
    > MB tested, some with 1999 vintage BIOS).
    >
    > It should be equally possible to start Plan9 from a non-primary partition -
    > perhaps the real issue is not 'reaching' it, but whether it can understand
    > where it is and finish the boot?


    It can. I run it from an extended partition.

    --
    John Stalker
    School of Mathematics
    Trinity College Dublin
    tel +353 1 896 1983
    fax +353 1 896 2282

+ Reply to Thread