Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-30-2004, 09:49 PM
|
#1
|
LQ Newbie
Registered: Mar 2004
Location: germany
Posts: 15
Rep:
|
mkdosfs generates invalid boot sector
(i'm n00b in linux, but not in computing in general)
using fedora core 1
SHORT VERSION:
i format a fat32 partition using mkdosfs. the partition is about 8 GB
mkdosfs -v -F 32 /dev/hda1
ranish partman (dos partition tool) will tell me that the boot sector of the partition is invalid.
is this a bug in mkdosfs or do i need to do something else to get a valid boot sector?
LONG VERSION:
summary of what i am trying to do
i want to be able to create a bootable (nt) fat32 partition from linux. the partition should be the first primary partition and is about 8 GB in size.
here is a step by step explanation of what i am doing
1. use fdisk to create the partition and set the type to fat32 (lba).
2. use mkdosfs to format the partition to fat32.
3. use ms-sys to make the boot sector bootable. (search for ms-sys in google, sorry forum wont let me post url)
4. unzip win2k to partition
this partition will not boot.
here is the mkdosfs command line i used
mkdosfs -v /dev/hda1
mkdosfs -v -F 32 /dev/hda1
with or without -F 32 the result is the same. contrary to the note in the manpage mkdosfs seems to know that it should use fat32.
and in contrast another attempt to achieve the same goal
1. use fdisk to create the partition and set the type to fat32 (lba).
2. boot to dos. format the partition using ranish partman (dos partition manager tool) (search for ranish in google)
3. back to linux. use ms-sys to make bootable
4. unzip win2k to partition
this partition will boot
it seems like mkdosfs is generating invalid boot sectors. ranish partman is reporting that the partition formatted by mkdosfs is having an invalid boot sector. it won't boot. yet files are written and read from the partition without problems.
did i miss something? help please
Last edited by HadroLepton; 03-31-2004 at 03:14 AM.
|
|
|
03-31-2004, 01:40 AM
|
#2
|
Member
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403
Rep:
|
do you want a dual boot between linux/win2k? if so, just let windows installation create the partition and install on it. windows will screw up your mbr (won't let you boot anything else than windows) but with a linux rescue cd / floppy you can re-install the boot loader and configure that to boot either windows or linux
greetz,
-= iluvatar =-
|
|
|
03-31-2004, 03:04 AM
|
#3
|
LQ Newbie
Registered: Mar 2004
Location: germany
Posts: 15
Original Poster
Rep:
|
thanks for your suggestion but that is not what i'm looking for. setting up a dual boot is no problem for me. i am quite familiar with the intricacies of the master boot record, the boot sector and boot managers.
my long term goal is to be able to create a linux boot cd with which i can save/restore windows (using zip rather than partition image tools). to do so i will have to be able to create a partition from scratch and make it bootable.
the theorie is like this:
install windows, setup settings.
boot to linux and zip the whole thing, save the zip.
*time passes by...*
windows gets screwed up (however severe, up to losing entire partition)
boot to linux, recreate the partition, unzip windows. make the partition bootable.
as i wrote above i have done this successfully almost entirely under linux. the only thing i haven't got right is the formatting using mkdosfs. as said it creates a file system which is working correct. i can copy files to the partition and read them. but the boot sector is invalid and thus i cannot boot from the partition.
|
|
|
03-31-2004, 03:17 AM
|
#4
|
LQ Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796
Rep:
|
I've had a look at this ms-sys program, this is whats on their project page:
Quote:
5. Known problems
-----------------
There have been reports about unbootable FAT32 partitions created with
"mformat -F c:". One workaround is to use gnu parted to create the
partition instead. Since version 1.1.3 ms-sys has the switch -p which
is supposed to fix this problem. The problem has also been reported on
partitions formatted with mkdosfs and mkfs.vfat.
|
see if it helps
|
|
|
03-31-2004, 03:26 AM
|
#5
|
Member
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403
Rep:
|
if you install windows (and let windows do the partition / format) and after that you copy the whole partition (with 'dd if=/dev/hda1 of=/<my file>' command), it should copy the boot sector too. but a note on windows 2000: it will store some pc specific info wich can't just be copied to other pc's. you first have to 'prepare' windows for this. this can be done (it is used with a M$ RIS "Remote Installation Server"). read this M$ howto it can be helpfull...
greetz,
-= iluvatar =-
|
|
|
03-31-2004, 12:36 PM
|
#6
|
LQ Newbie
Registered: Mar 2004
Location: germany
Posts: 15
Original Poster
Rep:
|
w00t that worked!!
the mkfs from parted is producing valid boot sectors
will try the -p switch later on an invalid boot sector to see if ms-sys can fix it
thanks Demonbane
|
|
|
10-28-2010, 12:26 PM
|
#7
|
LQ Newbie
Registered: May 2010
Posts: 2
Rep:
|
hi, i am heading for the same goal as you, and have got the same problem, and googled this thread. It has been 6 years.... However, this post still helped me, thanks.
|
|
|
All times are GMT -5. The time now is 09:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|