HD partition not ending on a cylinder boundary - Hardware

This is a discussion on HD partition not ending on a cylinder boundary - Hardware ; I'm installing sidux on a Thinkpad X81s (Vista), and ran into an issue about which I'm curious. That is, the partitions on the hard disk do not end on a cylinder boundary, and so cfdisk can't be used to repartition ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 26

Thread: HD partition not ending on a cylinder boundary

  1. HD partition not ending on a cylinder boundary

    I'm installing sidux on a Thinkpad X81s (Vista), and ran into an issue
    about which I'm curious. That is, the partitions on the hard disk do not
    end on a cylinder boundary, and so cfdisk can't be used to repartition
    (it just bombs out). I find that the solution to this problem is not to
    use cfdisk, but fdisk instead, wipe out everything, reboot the
    installation media, and then use cfisk.

    However, I'd like to understand what's going on. I've seen this problem
    reported on USB-sticks and hard disks. When I access the HD with fdisk
    and do a print, I get:

    /dev/sda1 start:1 end:653 blocks:5243904 id:27 system:unknown
    Partition 1 does not end on a cylinder boundary
    /dev/sda2 * start:653 end:9730 blocks:72904704 id:7 system:HPFS
    Partition 2 does not end on a cylinder boundary

    Isn't 653 the cylinder boundary here, and so why is there an overlap?

    Sometimes people blame Partition Magic for messing up the partition
    table in this way, but in my case this is a virgin drive that I've not
    had a chance to mess with yet. Is the partition overlap problem a real
    issue, or is it only a shortcoming of cfdisk in that it can't cope with
    the situation? Overlap does not seem to stop a system from running.

    A side question on partitioning. I read somewhere that one has to leave
    1 Mg unpartitioned space at the beginning of the disk to accommodate
    BIOS. This is new to me. Is it a peculiarity of laptops, of Thinkpad, of
    sidux?

    --

    Haines Brown, KB1GRM




  2. Re: HD partition not ending on a cylinder boundary

    Haines Brown staggered into the Black Sun and said:
    [snippage]
    > I read somewhere that one has to leave 1 Mg unpartitioned space at the
    > beginning of the disk to accommodate [the] BIOS. This is new to me. Is
    > it a peculiarity of laptops, of Thinkpad, of sidux?


    When did you read this? There were some cheap Compaqs that stored their
    BIOSes on hard disks during the early-mid 1990s. Modern machines don't
    do that for reasons which should be obvious. It's entirely possible
    that your laptop has a "utility partition" or a "restore partition" on
    it. These things usually contain useless crap, but there's almost
    always a way to reclaim that space by doing make+model-specific things
    in the BIOS Setup.

    --
    The squirrels now live in fear of the magic exploding compost heap.
    --Dan Holdsworth
    =======Hire me! http://crow202.dyndns.org:8080/~mhgraham/resume/
    Matt G|There is no Darkness in Eternity/But only Light too dim for us to see

  3. Re: HD partition not ending on a cylinder boundary

    Thanks for your response. You ask where I read that a Mb should be left
    at the beginning of the disk to accomodate BIOS, and you suggested such a
    practice harks back to the the earlier days of computers. I saw it on
    www.linux-on-laptops.com, where there's a document:

    Installing Sidux (Debian Sid) on Lenovo/IBM Thinkpad X61s
    Last updated: 2 August 2007

    where it says:

    > Installing was a breeze. I just emptied out the whole disk. Yes, no
    > more Vista (hurray!!!). After that I repartitioned. Keep one thing in
    > mind with partitioning: you have to keep the first 1Mb of your
    > harddisk unpartitioned as that is used by the BIOS!!!
    > Next I just followed the installers pointers and that was it.


    I'm sure you are right, but it was an interesting comment for someone to
    make.

    As for my principle concern here, I'm about to "empty the whole disk" by
    using fdisk because cfdisk failed, and wondered a) how can there be a
    partition overlap on a functional system, b) or is the problem a result
    of the limitations of cfdisk?

    --

    Haines Brown, KB1GRM




  4. Re: HD partition not ending on a cylinder boundary

    Haines Brown wrote:

    > I'm installing sidux on a Thinkpad X81s (Vista), [...


    Yikes!

    > ...] and ran into an issue about which I'm curious. That is, the
    > partitions on the hard disk do not end on a cylinder boundary, and so
    > cfdisk can't be used to repartition (it just bombs out).


    That is correct. /cfdisk/ is pedantic about partition boundaries coinciding
    with reported cylinder boundaries. ;-)

    > I find that the solution to this problem is not to use cfdisk, but fdisk
    > instead, wipe out everything, reboot the installation media, and then use
    > cfisk.


    Well, you could also use /fdisk/ itself for creating new partitions, of
    course. On the other hand, I myself also prefer /cfdisk./ :-)

    > However, I'd like to understand what's going on. I've seen this problem
    > reported on USB-sticks and hard disks. When I access the HD with fdisk
    > and do a print, I get:
    >
    > /dev/sda1 start:1 end:653 blocks:5243904 id:27 system:unknown
    > Partition 1 does not end on a cylinder boundary
    > /dev/sda2 * start:653 end:9730 blocks:72904704 id:7 system:HPFS
    > Partition 2 does not end on a cylinder boundary
    >
    > Isn't 653 the cylinder boundary here, and so why is there an overlap?


    Well, there are various reasons as to why this could be happening. First of
    all, no modern hard disk has the actual same geometry as it reports due to
    limitations of cylinder/head/sector addressing in contrast with the actual
    layout of modern-day large-capacity hard disks. As such, the disk
    internally uses linear logical block addresses and translates them to the
    BIOS as "politically correct" cylinder/head/sector addresses. The Linux
    kernel doesn't really care about the BIOS and its bootloaders now use
    logical block addressing by default. LILO and GRUB can even mimic (and
    change) reported BIOS disk geometry data for braindead operating systems
    such as DOS or the DOS-based Windows versions, which still heavily rely on
    BIOS data during boot. Or to put it shortly, a cylinder boundary as
    reported by the BIOS is in fact not a real cylinder boundary; it's only
    what the BIOS thinks is a cylinder boundary based upon the old C/H/S
    addressing. (Note: More modern BIOSes can use 32-bit or even 48-bit
    logical block addressing.)

    The second reason for the problem and probably the most important one is a
    certain company in Redmond, Washington. I don't do Windows, but I've heard
    from many people that they've had trouble with partition boundaries when
    installing GNU/Linux alongside Windows, and this dates back to the time of
    Windows 2000 - apparently NT 4.0 and earlier NTs still respected cylinder
    boundaries, but later versions of the NT-based Windows platforms do not.
    XP appeared to play nicer than Windows 2000 in that respect, but there were
    still reports of problems. One of the infamous Windows 2000 problems were
    that the firstly created Windows 2000 partition on a blank disk would start
    inside the space normally reserved for the master boot record, which made
    it very difficult to install LILO or GRUB in the master boot record. Well,
    actually, you _could_ do that, but then Windows 2000 wouldn't boot anymore.

    One could wonder why Windows doesn't respect partition boundaries or why it
    *needs* to disrespect them - especially in light of their previous
    compliance - so when all other logic fails, perhaps it is time to resort to
    the good old conspiracy theory.

    Microsoft does have it's own "Linux Lab" - Daniel Robbins, the founder of
    Gentoo, even worked there for a while - and so I wouldn't be surprised if
    they've deliberately made Windows screw with partition boundaries in order
    to create an extra obstacle when installing GNU/Linux alongside of it.

    Similarly, I've been told that installing Windows XP on a blank hard disk is
    impossible without partitioning the entire disk, i.e. it will barf if you
    decide to create only one Windows partition and leave the rest of the disk
    unused and it will demand that you create an extra partition or make the
    Windows partition itself the size of the entire hard disk, or at least the
    full size of the remaining space if there already is a Windows installation
    on the disk. Given Crimosoft's vile behavior in just about any other
    domain, I wouldn't be surprised if this partition boundary thing were
    indeed a deliberate choice of theirs - interoperability, anyone?

    You have to hand it to them: they have no clue whatsoever about designing
    and writing the code for a decent operating system, but they sure know how
    to screw things up for other operating systems. But even then, their
    screwing up will be pretty much like the code they write, i.e. it never
    meets its objective. It's like the dog that barks but never bites, because
    it doesn't know *how* to bite.

    On the other hand, perhaps we should invoke Hanlon's Razor over this
    matter...: "Never attribute to malice, that which can be adequately
    explained by stupidity." Well, with Microsoft, the odds are evenly
    distributed, so you can never know...

    > Sometimes people blame Partition Magic for messing up the partition
    > table in this way, but in my case this is a virgin drive that I've not
    > had a chance to mess with yet.


    Partition Magic does indeed also pull such tricks - hence the reference to
    "magic" - and apart from the fact that /cfdisk/ will bail out when
    partitions do not start or end on (BIOS-reported and thus fictional)
    cylinder boundaries, there are no real other problems. The Linux kernel
    doesn't really care much about partition boundaries coinciding with
    cylinder boundaries. But then again, the Linux kernel is an advanced piece
    of code, whereas Windows is a toy to stroke the ego of pointy-haired
    corporate bosses with.

    > Is the partition overlap problem a real issue, or is it only a shortcoming
    > of cfdisk in that it can't cope with the situation? Overlap does not seem
    > to stop a system from running.


    Exactly - this is what I've just written above. It is only an issue
    for /cfdisk]./ Note however that it is not an issue for /cfdisk/ in the
    sense that it would be braindead but rather in the sense that it tries to
    be pedantic and "politically correct" with regard to using GNU/Linux (or
    any other UNIX clone equipped with this tool) alongside less intelligently
    written code such as MS-DOS and Windows.

    > A side question on partitioning. I read somewhere that one has to leave
    > 1 Mg unpartitioned space at the beginning of the disk to accommodate
    > BIOS. This is new to me. Is it a peculiarity of laptops, of Thinkpad, of
    > sidux?


    It is actually required for the Linux BIOS, which is a fairly new initiative
    to replace the legacy real mode BIOS by a Linux kernel. The Linux BIOS is
    installed in a small partition at the start of a hard disk, and the
    hardware will load this BIOS from this disk automatically. From there, you
    can tell the Linux BIOS to boot any other storage medium via its set-up
    tools, just as you would with any other BIOS. The Linux BIOS is a kind of
    EFI BIOS, but I'm out on a limb here as I don't have any experience with
    either one of them. I was told that the Intel x86-based MacIntosh uses an
    on-disk EFI BIOS, but I lack the experience to either confirm or deny this.

    EFI is nowadays used on Intel Itanium motherboards and on SGI motherboards
    with a MIPS processor - I'm not sure on how a Sun SPARC, an Alpha or a
    PA/RISC boot, but I presume it would be in a similar fashion - but it is
    expected to become more prevalent in the x86 market segment as well over
    time.

    On the x86 platform, EFI runs in protected mode - i.e. the native mode of
    operation mode on x86-32 and x86-64 processors - and requires a special
    bootloader, typically ELILO - SPARC uses SILO instead. The normal GRUB and
    LILO bootloaders run in real mode, which is the 8086/8088-compatibility
    mode that every non-EFI x86 platform normally boots up into for
    compatibility with MS-DOS and DOS-based Windows versions.

    It is legacy technology that should have gotten replaced a long time ago,
    but the fact that Microsoft has continued to release DOS and DOS-based
    Windows versions for nearly two decades and Intel's virtual monopoly in the
    x86 market during the first of those two decades - AMD only started to
    really bloom around the early '90s - have kept this legacy technology
    alive.

    Anyway, legacy real mode BIOS versions as still used in most of the x86
    motherboard setups today are located in a Flash EPROM on the motherboard
    itself and do not require any partitions at the start of the hard disk or
    elsewhere. There are however certain proprietary BIOS firmware extensions
    such as FirstWare which must be installed in a small partition at the start
    of the hard disk, but this kind of firmware is mainly used for backing up
    partition tables and performing other low-level disk operations. To my
    knowledge, FirstWare only works with Phoenix BIOS chips for server-grade
    motherboards and is not required to be installed for normal operation.

    As for an EFI BIOS, not only does it run in protected mode, but also (and
    partly because of its operation in protected mode) gives you the
    possibility to create 128 primary partitions on a single hard disk. With a
    legacy BIOS, you can have only four primary partitions, which may be
    regular partitions or extended partition containers.

    An extended partition container is in fact a primary partition - i.e. it has
    a partition entry in the partition table in the hard disk's master boot
    record - which holds a second partition table for logical partitions inside
    the partition itself. DOS can only create and use one extended partition
    container, but NT-based Windows can handle logical partitions spread out
    over multiple extended containers. This reorganization is part of the
    technology Partition Magic uses to do it's "magic".

    Note: MS-DOS and the DOS-based Windows versions - i.e. all versions of
    Windows 95, Windows 98 and Windows ME - required that they be installed in
    an "active"[1] primary partition on the boot drive, and this primary
    partition has/had to start within the first 32 MB of the disk. This active
    partition is also the only primary partition which DOS and the DOS-based
    Windows versions can "see", so if you want to install - say - Windows 98
    and you need two partitions, then you have to create an active primary
    partition for Windows itself and create a logical partition in an extended
    container for use as the second Windows-accessible volume. The
    partitioning tool in Windows normally defaults to creating all subsequent
    partitions alongside of the main Windows partitions as logical partitions
    in a single extended partition container.

    NT-based Windows versions - i.e. NT 3.x, NT 4.0, Windows 2000, Windows XP,
    Windows 2003 Server, Vista and Windows 2008 Server - may themselves be
    installed either in other primary partitions or in logical partitions, even
    on another hard disk, but still do require their bootloader to exist in an
    "active" primary partition at the start of the boot disk.

    [1] "Active" in this context means that the partition is marked "bootable",
    something which GNU/Linux and its bootloaders do not pay any attention to
    and have no need for, but this "active" flag is part of the legacy BIOS
    technology. During a bootstrap procedure where there is no MBR-installed
    bootloader such as GRUB or LILO, the legacy BIOS will check for this
    "active" partition flag and will subsequently load the boot sector of the
    active partition into memory. This boot sector is what contains the DOS
    and Windows bootstrapping code, which will in turn then load their kernel
    and pass control to it - OS/2 used a similar approach. UNIX-style
    operating systems are typically booted by the kernel bootstrapping code
    being loaded into memory via a bootloader in the MBR (master boot record)
    of the hard disk and forfeit any BIOS bootstrapping code.

    --
    Aragorn
    (registered GNU/Linux user #223157)

  5. Re: HD partition not ending on a cylinder boundary

    Haines Brown wrote:

    > Thanks for your response. You ask where I read that a Mb should be left
    > at the beginning of the disk to accomodate BIOS, and you suggested such a
    > practice harks back to the the earlier days of computers. I saw it on
    > www.linux-on-laptops.com, where there's a document:
    >
    > Installing Sidux (Debian Sid) on Lenovo/IBM Thinkpad X61s
    > Last updated: 2 August 2007
    >
    > where it says:
    >
    >> Installing was a breeze. I just emptied out the whole disk. Yes, no
    >> more Vista (hurray!!!). After that I repartitioned. Keep one thing in
    >> mind with partitioning: you have to keep the first 1Mb of your
    >> harddisk unpartitioned as that is used by the BIOS!!!
    >> Next I just followed the installers pointers and that was it.

    >
    > I'm sure you are right, but it was an interesting comment for someone to
    > make.


    Probably as the previous poster stated, it's often used on laptops as some
    kind of recovery or utility partition. Well, if you're unsure, if you see
    a 1 MB partition at the start of your hard disk in /cfdisk/ or /fdisk,/
    then just leave it there. ;-)

    > As for my principle concern here, I'm about to "empty the whole disk" by
    > using fdisk because cfdisk failed, and wondered a) how can there be a
    > partition overlap on a functional system,


    This is not so hard to accomplish and will pose no immediate problems as
    long as nothing is being written to the last sectors of that partition.
    Yet it should not be relied upon and should be corrected by adjusting the
    partition boundaries and shrinking the filesystem of the first partition a
    bit to prevent those sectors to become overwritten with data.

    > b) or is the problem a result of the limitations of cfdisk?


    The overlapping partitions are not a problem with /cfdisk/ as /cfdisk/ will
    normally never create such flawed set-ups. Windows partitioning tools and
    Partition Magic on the other hand are known to exhibit such deviations.

    What *is* a limitation of /cfdisk/ however - see my other reply for a
    slightly more in-depth lecture on partitions - is that it refuses to deal
    with such "politically incorrect" partitions. So in order to correct the
    problem, you need to use either /fdisk/ or /sfdisk./ /parted/ may also be
    useful, but I've never used it so I can't really tell.

    --
    Aragorn
    (registered GNU/Linux user #223157)

  6. Re: HD partition not ending on a cylinder boundary

    In Dances With Crows:

    [Snip...]

    > There were some cheap Compaqs that stored their BIOSes on hard disks
    > during the early-mid 1990s


    FWIW...

    I have one of those (in fact, what I'm using ATM). Fortunately, I noticed
    (during a routine fdisk from tomsrtbt, prior to install) an odd partition
    at the beginning of the disk. Doing some research about it led to:

    http://www.compaq.com/products/serve...v8-2.html#_2.1

    My tower system is a Compaq Deskpro EN Series 6350 (very solid IMO, BTW).

    This is what my partitioning looks like:

    Disk /dev/hda: 4375 MB, 4375009280 bytes
    240 heads, 63 sectors/track, 565 cylinders
    Units = cylinders of 15120 * 512 = 7741440 bytes

    Device Boot Start End Blocks Id System
    /dev/hda1 1 7 52888+ c W95 FAT32 (LBA)
    /dev/hda2 * 8 10 22680 83 Linux
    /dev/hda3 11 45 264600 82 Linux swap / Solaris
    /dev/hda4 46 565 3931200 f W95 Ext'd (LBA)
    /dev/hda5 46 100 415768+ 83 Linux
    /dev/hda6 101 128 211648+ 83 Linux
    /dev/hda7 129 516 2933248+ 83 Linux
    /dev/hda8 517 550 257008+ 83 Linux
    /dev/hda9 551 564 105808+ 83 Linux

    Apparently, hda1 is this "mystery" partition where Compaq decided to keep
    a lot (all?) of their "extended" BIOS functions.

    It's important to me because AFAICT something there is needed for suspend
    to disk to work properly.

    This disk is apparently the original Compaq disk and had several versions
    of Linux installed (currently SuSE 10.0). With each install I was careful
    NOT to clobber this partion--so far no problems with "extended" BIOS.

    As a 2nds I bought, none of the original media were available. As a crude
    workaround, I made a dd copy of whatever's on hda1. If I replace the disk
    I'll attempt to restore this partition from it.

    HTH; YMMV...

    --
    Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
    Pardon any bogus email addresses (wookie) in place for spambots.
    Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
    Kids jumping ship? Looking to hire an old-school type? Email me.

  7. Re: HD partition not ending on a cylinder boundary

    Haines Brown staggered into the Black Sun and said:
    > you suggested such a practice harks back to the the earlier days of
    > computers. I saw it on www.linux-on-laptops.com, where there's a
    > document:
    > Installing Sidux (Debian Sid) on Lenovo/IBM Thinkpad X61s
    > Last updated: 2 August 2007
    >> Installing was a breeze. I just emptied out the whole disk. Yes, no
    >> more Vista (hurray!!!). After that I repartitioned. Keep one thing in
    >> mind with partitioning: you have to keep the first 1Mb of your
    >> harddisk unpartitioned as that is used by the BIOS!!!


    Multiple exclamation marks!!! Always a good sign when you're looking
    for straightforward technical data!!! OK, content > presentation, but
    I'd want to hear some more data from the person who posted that.

    > I'm sure you are right, but it was an interesting comment for someone
    > to make.


    I've had 4 different Thinkpads over the years: 380D, 600X, A22p, and
    T42p. None of them had any weirdnesses with the first M of the disk.
    The first partition started at sector 63, as is normal on the x86. The
    X series are a bit weirder than average because they were designed to be
    super-tiny and light, but I didn't think they had a different disk
    layout.

    > by using fdisk because cfdisk failed, and wondered a) how can there be
    > a partition overlap on a functional system, b) or is the problem a
    > result of the limitations of cfdisk?


    The other posters in this thread answered this one, I think.

    --
    I think I'll go hold my head under a bucket of vodka until I feel
    better. --localroger on kuro5hin.org, 06/26/2003
    =======Hire me! http://crow202.dyndns.org:8080/~mhgraham/resume/
    Matt G|There is no Darkness in Eternity/But only Light too dim for us to see

  8. Re: HD partition not ending on a cylinder boundary

    Aragorn writes:

    > Haines Brown wrote:
    >
    >> I'm installing sidux on a Thinkpad X81s (Vista), [...

    >
    > Yikes!


    It can be done in theory. Hope springs eternal.

    Thanks for the interesting information on cfdisk pendantry.

    > It is actually required for the Linux BIOS, which is a fairly new initiative
    > to replace the legacy real mode BIOS by a Linux kernel.


    OK

    > Anyway, legacy real mode BIOS versions as still used in most of the x86
    > motherboard setups today are located in a Flash EPROM on the motherboard
    > itself and do not require any partitions at the start of the hard disk or
    > elsewhere.


    Do I understand correctly that real mode BIOS is usually stored in
    EPROM, but Linux is now substituting a kernel BIOS that needs to be
    stored on the hard disk?. Is this correct? So I apparently after all I
    should leave a Mb free at the start of the hard disk. Do I simply leave
    1 Mb unpartitioned space at its beginning?

    --

    Haines Brown, KB1GRM




  9. Re: HD partition not ending on a cylinder boundary

    In <3_idnehhXKRRrFHanZ2dnUVZ_t7inZ2d@giganews.com> Scott Alfter:

    [Snip...]

    > Compaq used to have downloadable floppy images on its website that would
    > set up the system partition on an empty drive


    It would be nice to have such, but I don't know any useful details.

    I'm lazy and never pursued it too much, once I determined I could move on
    with Linux installs and retain "extended BIOS functions" (like suspend to
    disk) simply leaving this mystery partition alone.

    --
    Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
    Pardon any bogus email addresses (wookie) in place for spambots.
    Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
    Kids jumping ship? Looking to hire an old-school type? Email me.

  10. Re: HD partition not ending on a cylinder boundary

    On Mon, 03 Mar 2008 16:07:18 +0000, Harold Stevens rearranged some
    electrons to say:


    >
    > Disk /dev/hda: 4375 MB, 4375009280 bytes 240 heads, 63 sectors/track,
    > 565 cylinders Units = cylinders of 15120 * 512 = 7741440 bytes
    >
    >
    > Apparently, hda1 is this "mystery" partition where Compaq decided to
    > keep a lot (all?) of their "extended" BIOS functions.


    Maybe, but if it's really 7 cylinders, it's > 40MB.


  11. Re: HD partition not ending on a cylinder boundary

    In <47ccaf01$0$30678$4c368faf@roadrunner.com> david:

    [Snip...]

    > Maybe, but if it's really 7 cylinders, it's > 40MB.


    ?

    IMO, that's why the "mystery" partition STARTS (basically) right next to
    the MBR.

    IOW, it's there from gitgo, when hardware BIOS probes the disk, and well
    within the old boot start limits.

    Or am I missing something here?

    --
    Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
    Pardon any bogus email addresses (wookie) in place for spambots.
    Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
    Kids jumping ship? Looking to hire an old-school type? Email me.

  12. Re: HD partition not ending on a cylinder boundary

    Haines Brown writes:

    > Do I understand correctly that real mode BIOS is usually stored in
    > EPROM, but Linux is now substituting a kernel BIOS that needs to be
    > stored on the hard disk?. Is this correct? So I apparently after all I
    > should leave a Mb free at the start of the hard disk. Do I simply
    > leave 1 Mb unpartitioned space at its beginning?


    Not having received any reply to the above question, I had to
    proceed. My intention was to create a 1 Mb partition at the beginning of
    the disk, but cfdisk wouldn't allow me to do that (a 1 Mb partition
    simply does not show). So I gave up and deleted the two Vista partitions
    that came on the disk and created the partition table I wanted and
    brought the machine down for the night.

    Now I can't reboot. Same USB-stick; same grub menu.lst. Grub loading
    hangs at stage 1.5 and gives up with an Error 25 (disk
    inaccessible). This usually would be the result of a gummed up menu.lst,
    but in this case, I suspect because I had not created space at the
    beginning of the hard disk.

    Does a live usb-stick need a hard disk to boot? (I guess this is the
    same as my question above)? Can I modify grub menu.lst so that the
    kernel BIOS is temporarily put into RAM instead of the hard disk?

    How do I get out of this mess (the Thinkpad X81s does not have a floppy
    or optical drive)?

    How does one then normally create the 1 Mb partition at the beginning of
    the drive? Zero that space? How?

    --

    Haines Brown, KB1GRM




  13. Re: HD partition not ending on a cylinder boundary

    My message seems to have disappeared; apologies if a repeat:

    Haines Brown writes:

    > Do I understand correctly that real mode BIOS is usually stored in
    > EPROM, but Linux is now substituting a kernel BIOS that needs to be
    > stored on the hard disk?. Is this correct? So I apparently after all I
    > should leave a Mb free at the start of the hard disk. Do I simply
    > leave 1 Mb unpartitioned space at its beginning?


    Not having received any reply to the above question, I had to
    proceed. My intention was to create a 1 Mb partition at the beginning of
    the disk, but cfdisk wouldn't allow me to do that (a 1 Mb partition
    simply does not show). So I gave up and deleted the two Vista partitions
    that came on the disk and created the partition table I wanted and
    brought the machine down for the night.

    Now I can't reboot. Same USB-stick; same grub menu.lst. Grub loading
    hangs at stage 1.5 and gives up with an Error 25 (disk
    inaccessible). This usually would be the result of a gummed up menu.lst,
    but in this case, I suspect because I had not created space at the
    beginning of the hard disk.

    Does a live usb-stick need a hard disk to boot? (I guess this is the
    same as my question above)? Can I modify grub menu.lst so that the
    kernel BIOS is temporarily put into RAM instead of the hard disk?

    How do I get out of this mess (the Thinkpad X81s does not have a floppy
    or optical drive)?

    How does one then normally create the 1 Mb partition at the beginning of
    the drive? Zero that space? How?

    --

    Haines Brown, KB1GRM




  14. Re: HD partition not ending on a cylinder boundary

    Haines Brown wrote:

    > My message seems to have disappeared; apologies if a repeat


    .... As have my replies, obviously. I can't seem to find them on my own
    newsfeed, but I haven't checked yet whether Google has been able to archive
    them. They were sent off allright, without any error messages. Your posts
    did arrive on my newsfeed, though.

    Well, I guess it's one of those days again where the servers don't feel like
    synchronizing properly... :-/

    --
    Aragorn
    (registered GNU/Linux user #223157)

  15. Re: HD partition not ending on a cylinder boundary

    Haines Brown writes:

    > My message seems to have disappeared; apologies if a repeat:
    >
    > Haines Brown writes:
    >
    >> Do I understand correctly that real mode BIOS is usually stored in
    >> EPROM, but Linux is now substituting a kernel BIOS that needs to be
    >> stored on the hard disk?. Is this correct? So I apparently after all I
    >> should leave a Mb free at the start of the hard disk. Do I simply
    >> leave 1 Mb unpartitioned space at its beginning?


    No this is not correct. You don't need to leave space at the
    beginning of the disk.

    > Not having received any reply to the above question, I had to
    > proceed. My intention was to create a 1 Mb partition at the beginning of
    > the disk, but cfdisk wouldn't allow me to do that (a 1 Mb partition
    > simply does not show). So I gave up and deleted the two Vista partitions
    > that came on the disk and created the partition table I wanted and
    > brought the machine down for the night.
    >
    > Now I can't reboot. Same USB-stick; same grub menu.lst. Grub loading
    > hangs at stage 1.5 and gives up with an Error 25 (disk
    > inaccessible). This usually would be the result of a gummed up menu.lst,
    > but in this case, I suspect because I had not created space at the
    > beginning of the hard disk.


    Have you written anything to the hard disk yet? Anyway, I suspect
    that something in your menu.lst references a partition on the hard
    drive that no longer exists. Show us the menu.lst! Show us the
    partition table!

    > Does a live usb-stick need a hard disk to boot? (I guess this is the
    > same as my question above)? Can I modify grub menu.lst so that the
    > kernel BIOS is temporarily put into RAM instead of the hard disk?


    It shouldn't if it is properly made. And no, there is no such thing
    as a kernel BIOS. There is such a thing as a "Linux BIOS" but you
    don't have one.

    > How do I get out of this mess (the Thinkpad X81s does not have a floppy
    > or optical drive)?
    >
    > How does one then normally create the 1 Mb partition at the beginning of
    > the drive? Zero that space? How?


    One normally doesn't. Otherwise, use fdisk to create it, and dd to
    zero it.

    Scott
    --
    Scott Hemphill hemphill@alumni.caltech.edu
    "This isn't flying. This is falling, with style." -- Buzz Lightyear

  16. Re: HD partition not ending on a cylinder boundary

    Scott Hemphill writes:

    > Haines Brown writes:


    >>> So I apparently after all I should leave a Mb free at the start of
    >>> the hard disk. Do I simply leave 1 Mb unpartitioned space at its
    >>> beginning?


    > No this is not correct. You don't need to leave space at the
    > beginning of the disk.


    OK, thanks.

    >> Now I can't reboot. Same USB-stick; same grub menu.lst. Grub loading
    >> hangs at stage 1.5 and gives up with an Error 25 (disk
    >> inaccessible). This usually would be the result of a gummed up menu.lst,
    >> but in this case, I suspect because I had not created space at the
    >> beginning of the hard disk.

    >
    > Have you written anything to the hard disk yet? Anyway, I suspect
    > that something in your menu.lst references a partition on the hard
    > drive that no longer exists. Show us the menu.lst! Show us the
    > partition table!


    On a second try at rebooting, I got error 16, which is why I wondered
    about the MBR.

    When I created the USB-stick (sidux' USB Install) it wouldn't boot, and
    the reason was that the menu.list stanza read:

    ##ISO boot
    title sidux (fromISO + fromUSB)
    kernel (hd0,0)/boot/vmlinuz-2.6.23.12-slh-smp-2 boot=fll
    fromhd=UUID=b4f48c83-75df-4a04-b28a-bbcccc24113f
    fromiso nointro quiet vga=791 lang=us/fromiso
    initrd (hd0,0)/boot/initrd.img-2.6.23.12-slh-smp-2

    That didn't work, so I changed it to:

    title sidux (fromISO + fromUSB)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.23.12-slh-smp-2 boot=fll
    fromhd=UUID=b4f48c83-75df-4a04-b28a-bbcccc24113f
    fromiso nointro quiet vga=791 lang=us/fromiso
    initrd /boot/initrd.img-2.6.23.12-slh-smp-2

    This worked: I booted sidux OK and so went on to partition.

    I can't very well access the partition table under these circumstances,
    but I used cfdisk to create these partitions starting at the beginnng of
    the drive:

    /dev/sda1 primary type 73 Linux bootable 6Gb
    /dev/sda2 primary type 06 5Gb
    /dev/sda5 logical type 73 2Gb
    ... etc.

    With a lot of freespace at end. The write to disk and then print seemed
    normal.

    Do I have to restore the (hd0,0) to the initrd and kernel lines, while
    keeping the root (h0,0) as is?

    Perhaps relevant: In the sidux installer it said root partition was
    /dev/sdb1, which must have been my USB-key, for the Thinkpad HD is
    /dev/sda1 (I checked the USB-key and its partition and files seem
    intact).

    >> Does a live usb-stick need a hard disk to boot?


    > It shouldn't if it is properly made. And no, there is no such thing
    > as a kernel BIOS. There is such a thing as a "Linux BIOS" but you
    > don't have one.


    OK

    > One normally doesn't. Otherwise, use fdisk to create it, and dd to
    > zero it.


    Understood I don't have to do it, but how can one use fdisk if the
    USB-key won't boot?

    --

    Haines Brown, KB1GRM




  17. Re: HD partition not ending on a cylinder boundary

    Haines Brown writes:

    [snip]

    > When I created the USB-stick (sidux' USB Install) it wouldn't boot, and
    > the reason was that the menu.list stanza read:
    >
    > ##ISO boot
    > title sidux (fromISO + fromUSB)
    > kernel (hd0,0)/boot/vmlinuz-2.6.23.12-slh-smp-2 boot=fll
    > fromhd=UUID=b4f48c83-75df-4a04-b28a-bbcccc24113f
    > fromiso nointro quiet vga=791 lang=us/fromiso
    > initrd (hd0,0)/boot/initrd.img-2.6.23.12-slh-smp-2
    >
    > That didn't work, so I changed it to:
    >
    > title sidux (fromISO + fromUSB)
    > root (hd0,0)
    > kernel /boot/vmlinuz-2.6.23.12-slh-smp-2 boot=fll
    > fromhd=UUID=b4f48c83-75df-4a04-b28a-bbcccc24113f
    > fromiso nointro quiet vga=791 lang=us/fromiso
    > initrd /boot/initrd.img-2.6.23.12-slh-smp-2
    >
    > This worked: I booted sidux OK and so went on to partition.


    That is strange. They should have been equivalent. Are you getting
    this directly from the USB stick or are you typing from notes?
    Anyway, both of these expect the kernel and the initrd file to be on
    the first partition of the first disk. Have you changed the boot
    order in the BIOS? That could flip "hd0" and "hd1". If you have,
    either switch it back or change "(hd0,0)" to "(hd1,0)".

    I'll admit that I know practically nothing about sidux, but the rest
    of the configuration looks screwy. If you have an iso image on the
    USB stick, then it should be specified with "fromiso=...". Then you
    wouldn't need the "fromhd" entry. Maybe you don't have the iso file,
    but its directory structure on the USB stick in sidux/sidux. Then you
    don't need the "fromiso" entry. Also, the "lang=us/fromiso" looks
    wrong. What instructions did you follow in setting this up?

    > I can't very well access the partition table under these circumstances,
    > but I used cfdisk to create these partitions starting at the beginnng of
    > the drive:


    I suppose you don't have a CD-ROM on this computer, which is why you
    are trying to do a USB install?

    >
    > /dev/sda1 primary type 73 Linux bootable 6Gb
    > /dev/sda2 primary type 06 5Gb
    > /dev/sda5 logical type 73 2Gb
    > ... etc.
    >
    > With a lot of freespace at end. The write to disk and then print seemed
    > normal.


    OK, that's probably good enough.

    >
    > Do I have to restore the (hd0,0) to the initrd and kernel lines, while
    > keeping the root (h0,0) as is?
    >
    > Perhaps relevant: In the sidux installer it said root partition was
    > /dev/sdb1, which must have been my USB-key, for the Thinkpad HD is
    > /dev/sda1 (I checked the USB-key and its partition and files seem
    > intact).
    >
    >>> Does a live usb-stick need a hard disk to boot?

    >
    >> It shouldn't if it is properly made. And no, there is no such thing
    >> as a kernel BIOS. There is such a thing as a "Linux BIOS" but you
    >> don't have one.

    >
    > OK
    >
    >> One normally doesn't. Otherwise, use fdisk to create it, and dd to
    >> zero it.

    >
    > Understood I don't have to do it, but how can one use fdisk if the
    > USB-key won't boot?


    Well, first fix the USB-key.

    Scott
    --
    Scott Hemphill hemphill@alumni.caltech.edu
    "This isn't flying. This is falling, with style." -- Buzz Lightyear

  18. Re: HD partition not ending on a cylinder boundary

    Scott Hemphill writes:

    > Haines Brown writes:
    >
    > [snip]
    >
    >> When I created the USB-stick (sidux' USB Install) it wouldn't boot, and
    >> the reason was that the menu.list stanza read:
    >>
    >> ##ISO boot
    >> title sidux (fromISO + fromUSB)
    >> kernel (hd0,0)/boot/vmlinuz-2.6.23.12-slh-smp-2 boot=fll
    >> fromhd=UUID=b4f48c83-75df-4a04-b28a-bbcccc24113f
    >> fromiso nointro quiet vga=791 lang=us/fromiso
    >> initrd (hd0,0)/boot/initrd.img-2.6.23.12-slh-smp-2
    >>
    >> That didn't work, so I changed it to:
    >>
    >> title sidux (fromISO + fromUSB)
    >> root (hd0,0)
    >> kernel /boot/vmlinuz-2.6.23.12-slh-smp-2 boot=fll
    >> fromhd=UUID=b4f48c83-75df-4a04-b28a-bbcccc24113f
    >> fromiso nointro quiet vga=791 lang=us/fromiso
    >> initrd /boot/initrd.img-2.6.23.12-slh-smp-2
    >>
    >> This worked: I booted sidux OK and so went on to partition.

    >
    > That is strange. They should have been equivalent.


    That I didn't know. Thanks.

    > Are you getting
    > this directly from the USB stick or are you typing from notes?


    No, this from the stick.

    > Anyway, both of these expect the kernel and the initrd file to be on
    > the first partition of the first disk. Have you changed the boot
    > order in the BIOS? That could flip "hd0" and "hd1". If you have,
    > either switch it back or change "(hd0,0)" to "(hd1,0)".


    This is what I was beginning to suspect, that the drive order had
    changed. I'm a veteran of multiple SCSI drives where what determins
    drive order seems a mystery, but I gather that problem can apply to a
    usb-stick/scsi hd combo as well.

    On my Thinkpad X61s, it apparently does not have device boot order set
    in BIOS, but instead through bringing up a device menu by hitting F12
    key. So instead of specify device order, I'm targetting a specific drive
    to boot from, which of course is the USB-key. Wouldn't this obviate any
    issue of which gets assigned to sda and which sdb? Nevertheless, once
    the boot starts, who knows which will end up which?

    I'll try, as you suggest, to play with the drive number.

    > I'll admit that I know practically nothing about sidux, but the rest
    > of the configuration looks screwy. If you have an iso image on the
    > USB stick, then it should be specified with "fromiso=...". Then you
    > wouldn't need the "fromhd" entry. Maybe you don't have the iso file,
    > but its directory structure on the USB stick in sidux/sidux. Then you
    > don't need the "fromiso" entry. Also, the "lang=us/fromiso" looks
    > wrong. What instructions did you follow in setting this up?


    I find that "boot-fll" is a shortcut to indicate that the boot should be
    from an .iso file. The cheatcode "fromhd=.." means that CD-Roms are
    ignored so you can boot with the original cdrom (I don't understand
    this). I gather that normal usage points to a device such as
    /dev/sda1. Here it is instead using a HD UUID, and I wonder where it got
    that ID and whether it is the ID of the USB-stick or the drive from
    which the stick was created. In any case, I could add a stanza to the
    menu.ist on the stick that omits it. The lang=us is a default example,
    and so I preserved it, and I added the /fromiso before I realized that
    fromiso was being put into the stanza automatically.

    The stick's directory structure is

    /sidux.iso
    /boot
    initrd...
    vmlinuz...
    /grub
    stage1
    stage2
    menu.lst
    ...

    This seemed normal to me.

    I followed sixux directions for setting up, but these were not
    specific. I'll play with different stanzas to see if I can isolate the
    problem.

    > I suppose you don't have a CD-ROM on this computer, which is why you
    > are trying to do a USB install?


    That's correct.

    Thanks Scott. You have directed my attention from the MBR issue to grub
    menu.lst

    --

    Haines Brown, KB1GRM




  19. Re: HD partition not ending on a cylinder boundary

    Haines Brown wrote:

    > This is what I was beginning to suspect, that the drive order had
    > changed. I'm a veteran of multiple SCSI drives where what determins
    > drive order seems a mystery, but I gather that problem can apply to a
    > usb-stick/scsi hd combo as well.


    Just a short reply to the above as my ISP's newsserver seems to be having
    difficulties and I don't even know whether this post will make it through.

    With parallel SCSI, that which determines the order is the SCSI ID; the
    lower the SCSI ID, the higher the priority of the device in the list. I
    presume it works similarly with the SAS addresses on SAS drives but I can't
    corroborate this as my SAS disks are all in a hardware RAID 5 array and are
    thus seen as being one disk by the operating system.

    On a system with SCSI disks, SATA disks and USB sticks, the SCSI disks will
    be considered to have a higher priority than the SATA disks and they in
    turn will have a higher priority than USB storage.

    So if you have one of each, the order will be...:

    - */dev/sda* = the SCSI hard disk
    - */dev/sdb* = the SATA hard disk
    - */dev/sdc* = the USB stick

    Hope this helps (and that this posts makes it to your newsfeed!). ;-)

    --
    Aragorn
    (registered GNU/Linux user #223157)

  20. Re: HD partition not ending on a cylinder boundary

    Scott Hemphill writes:

    > Haines Brown writes:
    >
    > [snip]
    >
    >> When I created the USB-stick (sidux' USB Install) it wouldn't boot, and
    >> the reason was that the menu.list stanza read:
    >>
    >> ##ISO boot
    >> title sidux (fromISO + fromUSB)
    >> kernel (hd0,0)/boot/vmlinuz-2.6.23.12-slh-smp-2 boot=fll
    >> fromhd=UUID=b4f48c83-75df-4a04-b28a-bbcccc24113f
    >> fromiso nointro quiet vga=791 lang=us/fromiso
    >> initrd (hd0,0)/boot/initrd.img-2.6.23.12-slh-smp-2
    >>
    >> That didn't work, so I changed it to:
    >>
    >> title sidux (fromISO + fromUSB)
    >> root (hd0,0)
    >> kernel /boot/vmlinuz-2.6.23.12-slh-smp-2 boot=fll
    >> fromhd=UUID=b4f48c83-75df-4a04-b28a-bbcccc24113f
    >> fromiso nointro quiet vga=791 lang=us/fromiso
    >> initrd /boot/initrd.img-2.6.23.12-slh-smp-2
    >>
    >> This worked: I booted sidux OK and so went on to partition.

    >
    > That is strange. They should have been equivalent. Are you getting
    > this directly from the USB stick or are you typing from notes?
    > Anyway, both of these expect the kernel and the initrd file to be on
    > the first partition of the first disk. Have you changed the boot
    > order in the BIOS? That could flip "hd0" and "hd1". If you have,
    > either switch it back or change "(hd0,0)" to "(hd1,0)".
    >
    > I'll admit that I know practically nothing about sidux, but the rest
    > of the configuration looks screwy. If you have an iso image on the
    > USB stick, then it should be specified with "fromiso=...". Then you
    > wouldn't need the "fromhd" entry. Maybe you don't have the iso file,
    > but its directory structure on the USB stick in sidux/sidux. Then you
    > don't need the "fromiso" entry. Also, the "lang=us/fromiso" looks
    > wrong. What instructions did you follow in setting this up?


    OK, now I've successfully built a sidux installation USB stick. I gave up
    trying to find instructions on the web, and I just did it. Here's what I
    did:

    I created the USB-stick under Fedora 8.

    1. I started by downloading
    sidux-2008-01-200803010113-nyx_pre1-kde-lite-i386.iso and
    sidux-2008-01-200803010113-nyx_pre1-kde-lite-i386.iso.md5.
    I checked the contents of the iso file with "md5sum -c sidux*.md5".

    2. I made the directory /tmp/mnt and mounted the iso file using
    "mount -t iso9660 -o loop,ro sidux*.iso /tmp/mnt".


    3. I inserted a brand-new USB-stick in my computer. It auto-mounted, so I
    unmounted it. Using fdisk, I changed the Id of the one existing
    partition from FAT to Linux, and re-wrote the partition table. Here's
    what it looks like:

    Disk /dev/sde: 1031 MB, 1031306752 bytes
    32 heads, 63 sectors/track, 999 cylinders
    Units = cylinders of 2016 * 512 = 1032192 bytes
    Disk identifier: 0x00000000

    Device Boot Start End Blocks Id System
    /dev/sde1 1 999 1006870+ 83 Linux


    4. I then created an ext2 filesystem using "mkfs.ext2 /dev/sde1". I created
    a directory called /tmp/media and mounted the filesystem using
    "mount -t ext2 /dev/sde1 /tmp/media".

    5. I copied the contents of /tmp/mnt/boot to the USB stick with
    "cp -a /tmp/mnt/boot /tmp/media".

    6. I copied the iso image to the USB stick with
    "cp sidux*.iso /tmp/media/sidux.iso". Note that I gave the file a much
    simpler name, since I was planning on typing it into grub later.

    7. I went to /tmp/media/boot/grub and removed everything but the three
    menus. I then copied my own (Fedora 8) grub stage files into that
    directory. Specifically, I copied

    stage1
    e2fs_stage_1_5
    stage2

    from /boot/grub into /tmp/media/boot/grub.

    8. I unmounted /tmp/media and then ran grub and gave the commands:

    root (hd4,0)
    setup (hd4)

    (Device hd4 on my system corresponds with /dev/sde.) I then noted that
    the setup command was equivalent to two commands:

    embed /boot/grub/e2fs_stage_1_5
    install /boot/grub/stage1 (hd4) (hd4)1+16 p (hd4,0)/boot/grub/stage2 \
    /boot/grub/grub.conf

    (I added the "\" to denote line continuation.) Since the sidux main
    menu is not "grub.conf" but "menu.lst". I then gave grub the commands:

    install /boot/grub/stage1 (hd4) (hd4)1+16 p (hd4,0)/boot/grub/stage2 \
    /boot/grub/menu.lst
    quit

    9. I then rebooted my system, changing the BIOS setup to boot from the
    USB stick. The GRUB menu came up. Notice that I hadn't made any
    changes to the menu yet! At boot time I used the GRUB editor to add
    the entry "fromiso=/sidux.iso" to the kernel line, and then booted.
    It worked! Here's the portion of the menu.lst file that corresponds
    to the default menu entry:

    title sidux i386
    kernel /boot/vmlinuz-2.6.24-2.6.24.3.slh.1-sidux-686 boot=fll quiet vga=791
    initrd /boot/initrd.img-2.6.24-2.6.24.3.slh.1-sidux-686

    All I did was add a space and "fromiso=/sidux.iso" after the "vga=791"
    in the kernel line at boot time.

    Scott
    --
    Scott Hemphill hemphill@alumni.caltech.edu
    "This isn't flying. This is falling, with style." -- Buzz Lightyear

+ Reply to Thread
Page 1 of 2 1 2 LastLast