Re: [Freedos-user] FreeDOS 1.1: About installation cd AND system backup???
Hi, Just a little bit of non-expert info from me here, On Tue, Jun 5, 2012 at 5:10 PM, Joe(theWordy)Philbrook 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 others. 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
Re: [Freedos-user] FreeDOS 1.1: About installation cd AND system backup???
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... 2) Even though it was a partition image, and not just a file copy, the restored FreeDOS was unbootable. {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. 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. 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??? 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. > 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 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... In any case, Thank you for responding to my request for info. -- | ~^~ ~^~ | <*> <*> Joe (theWordy) Philbrook | ^J(tWdy)P | \___/ <> -- 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 Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] FreeDOS 1.1: About installation cd AND system backup???
On Sun, Jun 3, 2012 at 3:46 PM, Eric Auer wrote: > In the case of GRUB2 (?) it will then search the > PC for bootable operating systems by looking at all > boot records and present those as boot menu. Classic > GRUB relied more on a configuration file for that, in > GRUB2 it is more automatic... Sort of. Grub2 still uses a config file, in /boot/grub, and it's possible to edit that file manually, though the file itself says not to. I did so here because the grub routines that searched for OSes were double counting a Linux install, and showing two entries for it in the boot menu. But the routines that build a grub config for you changed significantly, and there are changes to the config file format. See https://help.ubuntu.com/community/Grub2 __ Dennis https://plus.google.com/u/0/105128793974319004519 -- 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 Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] FreeDOS 1.1: About installation cd AND system backup???
Hi! > 1) When, at the end of the install, the installer asks what to do with >the bootsector AKA "Volume Boot Record". Is it the same thing as when a >linux installer allows me to install grub to the 1st superblock of the >"/" partition??? {it seams to have the same effect} Yes that is similar. In both cases, you need to boot the partition (for example using a boot menu in the MBR for the whole disk) and then the boot sector in the DOS partition or the superblock in the Linux one contain code to continue booting. However, GRUB often is used as boot menu, not just to load Linux, so GRUB is often configured as the to-be-booted-thing in your MBR. In the case of GRUB2 (?) it will then search the PC for bootable operating systems by looking at all boot records and present those as boot menu. Classic GRUB relied more on a configuration file for that, in GRUB2 it is more automatic... > 2) Is there a way to make that happen for a restored backup of a fully >configured copy of freedos... I mean Like if I made a boot floppy and >used it to do something like " A:> sys c: ", would that have the same >effect?? There are two cases: You made a backup of all files, so you failed to backup the boot sector, or you made a diskimage, but restored it to another location, so the boot sector needs fresh adjustments... In both cases, you need something to fix your DOS boot sector. You can boot DOS from CD, DVD, USB or diskette and simply run "SYS C:" indeed. You can also use Linux and run the "sys freedos linux" tool (sys-freedos.pl) to make a bootsector for a partition or diskimage. In the latter case, you may have to manually specify the absolute location of the partition, as mkdosfs (Linux tool to format FAT partitions) may fail to do so. If your partition already was formatted by DOS / Windows anyway, the offset should already be set... See also: http://wiki.fdos.info/Installation/BootDiskCreateUSB Note that you can use any FreeDOS boot floppy image to make a bootable floppy or CD or DVD, the latter by specifying the floppy image as the boot image in most decent CD / DVD writing tools (e.g. k3b works fine). I think FreeDOS provides a regular build for minimal boot disks, but you can also use Rugxulo's RUFFIDEA distro which contains most of FreeDOS 1.0 "base" and some updates and small extra tools on very few disks. > 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. 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). 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. Eric -- 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 Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user