Just a little bit of non-expert info from me here,

On Tue, Jun 5, 2012 at 5:10 PM, Joe(theWordy)Philbrook <jtw...@ttlc.net> wrote:
> It would appear that on Jun 3, Eric Auer did say:
>> > 3) you wouldn't happen to know if using clonezilla's expert mode
>> >     to de-select cloning the "hidden data between MBR and 1st
>> >     partition" when making a clone of a working bootable {via
>> >     chainloader} freedos partition, would result in a clone that
>> >     wouldn't trash the existing MBR when it was...
>> I do not understand the question.
> Perhaps more background information would make the question clearer...
> For some reason beyond my understanding, when I restored the
> partition image I'd made of the FreeDOS partition with
> clonezilla, two things happened which I don't understand.
> 1) Even though I had carefully selected the menu options to save
>   and restore "partition" images and decidedly did NOT select
>   "whole disk" images, the restore action overwrote my MBR???
>   I had to use a rescue disk to get my grub menu back...

Overwrote the MBR (at sector zero) completely?? Or just changed the
partition table (very likely)?

IIRC, the MBR is 512 bytes with both boot sector and partition table.
So you have to have a DOS (primary  FAT, active) in there somewhere.

GRUB won't fit in 512 bytes, not even close. It just stuffs something
in the MBR that loads stage 1.5 (or whatever) which is hidden
somewhere else (with various file system drivers??). And that is used
to find the appropriate (primary or extended) partitions, which have
their own boot sectors, I think.

On my desktop which triple-boots, I have BOOTMGR as main booter in the
MBR, and if I choose FreeDOS, it boots the FAT32 partition. If I
choose Win7, it jumps to the NTFS partition which uses Windows' own
NTLDR (or whatever it's called these days). If I choose Linux, it
loads GRUB in the ext3 partition, which then boots up PuppyLinux.

All of this is very arcane and complicated. I think this is why it is
often recommended to install certain OSes first before installing

You can load and save the MBR via (DOS-based) bootmgr.com , so once
you get a working Linux setup with GRUB, it should be fairly easy to
setup for FreeDOS, esp. as BOOTMGR doesn't need any extra payloads (or
whatever) to load to further load (etc. etc.).

I know GRUB is supposed to handle all of this, but it's honestly kinda
cryptic and annoying. Maybe you could try something else like Gujin to
boot your Linux partition. It has a mini DOS-based version too, and it
should? autodetect things for you (though you may or may not need
vmlinuz [kernel] and initrd* [magic goop] on your FAT partition).

> 2) Even though it was a partition image, and not just a file copy, the
>   restored FreeDOS was unbootable.

It is possible to make it bootable, but something was probably
misconfigured or not saved correctly. It's a very arcane black art,
partitions and MBRs and boot sectors. I really do sympathize, it's
just frustrating and complicated.

Just don't give up, keep looking / reading / researching / fiddling.
Be careful and backup important stuff, but eventually you should get
it working (God willing!).

You may? find it easier to learn / play with some of this inside a
scratch setup in a VM (e.g. VirtualBox or QEMU) first, hence not
worrying about destroying anything important.

>   {I had already installed and configured several dos utilities and
>   games, so lacking a boot floppy from which I could have tried the
>   sys command, my solution was to mount the FreeDOS partition from
>   Linux and using mc I made a "file" copy of the partition's entire
>   filesystem.

No boot floppy itself or no (working) drive?? You could always use a
bootable CD, I suppose, e.g. PLoP Boot Loader.

BTW, as mentioned, the partition itself isn't all you need.

> Then I reinstalled a fresh copy of FreeDOS to get to
>   the bootloader selection choice where I could select writing the
>   FreeDOS code to the bootsector.

FreeDOS' sys.com should (I think?) only update the FAT partition and
not mess with the MBR. Not sure how carefully conservative FreeDOS
FDISK is, but you don't really need that except to create a FAT
partition "from scratch" (and honestly I might? suggest a different
tool instead).

Just don't muck with the MBR at all, if you don't need to. It's
ideally only there to basically coordinate between various multi-boot
systems. Like I said, it's basically useless for GRUB, all it does is
say, "Okay, now time to call GRUB to do the 'real work' !!" (And GRUB
has to fit somewhere, but I don't know the details where "by default"
or how much space it needs.)

> Then finally I rebooted Linux and
>   again used mc to copy the entire backed up FreeDOS file system
>   back to the mounted FreeDOS partition {overwriting all files}
>   which resulted in a working Freedos WITH the software I'd added
>   such as vim, less, and an mc like clone of nc, as well as some
>   toys, all in place and working...}
> I was asking if anybody knew if clonezilla's expert mode option to deselect
> the cloning of what it called "hidden data between MBR and 1st partition"
> would in fact force it to omit recording whatever garbage it wrote to my
> MBR???

Between MBR and 1st partition shouldn't be anything (except perhaps
GRUB itself), or so I thought. Dunno about Clonezilla specifics, never
used it. MBR is only 512 bytes, so you can save and restore it via
bootmgr.com in FreeDOS. The MBR is important but very small, so it's
not all you need anyways. (And if you muck it up, you could maybe use
TestDisk in FreeDOS or other popular OSes to recover / repair the
partition table.)

> Though I've also followed up on that elsewhere and it seems nobody has seen
> clonzilla do that, so I'm thinking it may have only been a fluke. And I'm
> thinking I'm going to have to resort to much empirical testing before I
> begin to fully trust my back-up needs to clonezilla.

It's a mess, sorry, good luck!

>> In the MBR, you may have a boot menu such as GRUB. Which
>> may extend into the space between MBR and 1st partition.
>> To boot DOS, you need anything (MBR directly, or a boot
>> menu) to get you to the boot sector of the DOS partition
>> which must be a PRIMARY partition (sda/hda/... numbers
>> 1-4) and the boot sector of the DOS partition must contain
>> the correct info about WHERE the partition is, as in
>> distance from start-of-disk / MBR to the DOS partition
>> itself (DOS sometimes calls this nr of hidden sectors).
> Yeah, that's about what I thought.
>> Actually you could even boot DOS from a non-primary
>> partition if you fixed the location information, as
>> normally non-primary partitions use "relative" place
>> values while booting needs "absolute" ones. Not sure
>> which side effects you would get, though.
> Now THAT does surprise me. And would be, no doubt, a little beyond my skill
> level. Me thinks it would be easier to relocate one of my Linux to a
> non-primary partition, (and edit any fstab and grub references that do not use
> LABEL= or <yuck> those unreadable UUID= references instead of device names
> to identify said device) to free up a primary partition for FreeDOS than to
> pretend I had a clue how to rewrite the boot sector of a non-primary
> partition to use absolute values...

Gujin tries to be automatic and avoids config files, I think. But
depending on what Linux you want to use (or is already installed), I
guess your needs may vary. If it doesn't matter specifically what
Linux, I'd suggest something like PuppyLinux "frugal", which can be
contained in a few files (including one big one for user data), even
atop FAT. And you can boot that via various tools from within a "bare"
DOS (no memory managers), so in essence, you would boot to minimal DOS
"no matter what" and then (optionally) boot Linux. Might make things
easier. (Or not, just an idea.)

P.S. Sorry if this isn't all directly applicable and doesn't
immediately fix things for you, but hopefully it gives you some ideas.
(BTW, Dennis, did you ever use wDE to take a closer look at your
partitions, MBR, boot sectors, etc.??? It would certainly shed "some"
light on your multi-boot issue as well.)

Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Freedos-user mailing list

Reply via email to