Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Windows won't piss off! (fdisk issues)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
gojuka
Apprentice
Apprentice


Joined: 18 Oct 2002
Posts: 235
Location: Kingston, Ontario, Canada

PostPosted: Thu Nov 28, 2002 1:41 pm    Post subject: Windows won't piss off! (fdisk issues) Reply with quote

Hi all,

Been running gentoo on my laptop for about a month now and I love it. No, grub does not suck. :D

So I decided to upgrade my desktop to gentoo as well. It has 2 drives, and 8GB (hda) and a 4GB (hdc). I have mandrake 9 on the hdc and windows 98se on hda. My plan was to backup anything important on hda (quicken files, old email, pr0n ...), install gentoo on hda, move my user environment from hdc to hda, reinstall win98 to hdc (I only use it to play 1/2life). No prob.

So out of habit, I boot from my win98 CD to a command line. Used Windows fdisk to delete the Windows partition and rebooted. Booting from the Gentoo CD, I ran fdisk and created hda1 (/boot), hda2 (swap) and hda3 (/), wrote that out and rebooted (probably not required but old habits).

After booting from the gentoo CD again, I followed the usual install instructions including running `mke2fs -j` on /dev/hda1 and mkreiserfs on /dev/hda3. But after mounting /mnt/gentoo and /mnt/gentoo/boot, I tried to unpack the stage1 tarball, but it errored out. The tarball was fine, but it failed to write something. I looked around and, doing an ls on /boot, I got back the directory listed for the root of my windows C: drive! *zoiks*

[Wackiness ensues] `mount` showed me that when I ran `mount /dev/hda1 /mnt/gentoo/boot` it actually mounted /dev/hda1 as vfat and not ext3! But if I explicitly mounted /dev/hda1 as ext3, then it looked fine (empty except for a lost+found). I don't get it.

Why would mount assume /dev/hda1 was vfat when it is ext3 ... even fdisk shows it as ext3.

Mark
_________________
we're outta control
Back to top
View user's profile Send private message
Exci
Apprentice
Apprentice


Joined: 12 Jul 2002
Posts: 265
Location: The Netherlands, Zoetermeer

PostPosted: Thu Nov 28, 2002 5:26 pm    Post subject: Reply with quote

i had that same problem once ..
i started reading the fdisk man page and i found this:

Code:

DOS 6.x WARNING
       The DOS 6.x FORMAT command looks for some information in the first sector of the data area of the  parti-
       tion, and treats this information as more reliable than the information in the partition table.  DOS FOR-
       MAT expects DOS FDISK to clear the first 512 bytes of the data area of a partition whenever a size change
       occurs.   DOS FORMAT will look at this extra information even if the /U flag is given -- we consider this
       a bug in DOS FORMAT and DOS FDISK.

       The bottom line is that if you use cfdisk or fdisk to change the size of a  DOS  partition  table  entry,
       then you must also use dd to zero the first 512 bytes of that partition before using DOS FORMAT to format
       the partition.  For example, if you were using cfdisk to make a DOS partition table entry for  /dev/hda1,
       then (after exiting fdisk or cfdisk and rebooting Linux so that the partition table information is valid)
       you would use the command "dd if=/dev/zero of=/dev/hda1 bs=512 count=1" to zero the first  512  bytes  of
       the partition.

       BE  EXTREMELY CAREFUL if you use the dd command, since a small typo can make all of the data on your disk
       useless.

       For best results, you should always use an OS-specific partition table program.  For example, you  should
       make  DOS partitions with the DOS FDISK program and Linux partitions with the Linux fdisk or Linux cfdisk
       program.
Back to top
View user's profile Send private message
really
Guru
Guru


Joined: 27 Aug 2002
Posts: 430
Location: nowhere

PostPosted: Thu Nov 28, 2002 5:40 pm    Post subject: Reply with quote

yea i would do as the other guy mentioned. zero out the mbr and then write a new one format and install.
dd if=/dev/zero of=/dev/hda bs=512 count=512 :D :D
fdisk /dev/hda
and it will tell you theres no mbr or something blah blah bla.... write a new one and youre done.
_________________
NoManNoProblem

Get lost before you get shot.
Back to top
View user's profile Send private message
LoOpYgUy
n00b
n00b


Joined: 24 Sep 2002
Posts: 30

PostPosted: Thu Nov 28, 2002 6:27 pm    Post subject: Reply with quote

As well, you could just boot of a windows boot disk, since you stated earlier that you are more familiar with the evil empires fdisk utility, and type

Code:
fdisk /mbr


That should take care of the issue as well.
Back to top
View user's profile Send private message
gojuka
Apprentice
Apprentice


Joined: 18 Oct 2002
Posts: 235
Location: Kingston, Ontario, Canada

PostPosted: Thu Nov 28, 2002 6:36 pm    Post subject: Reply with quote

Quote:
you stated earlier that you are more familiar with the evil empires fdisk utility


I said what? Where? When? Man, do I feel insulted. Just FYI, I've been using Linux as my sole desktop since 1993. I have one windows install that I use to play half-life. Where you got "more familiar with the evil empires fdisk" from I have no idea.

I don't want to whack the mbr because I have lilo in there to boot my existing mandrake 9 install. I just thought it odd that mount was mounting hda1 as vfat when I've overwritten the partition table already.

Mark
_________________
we're outta control
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Nov 28, 2002 7:44 pm    Post subject: Reply with quote

Try searching the forums for "ghost and superblock".
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
LoOpYgUy
n00b
n00b


Joined: 24 Sep 2002
Posts: 30

PostPosted: Fri Nov 29, 2002 1:02 am    Post subject: Reply with quote

Well when I seen this line in your post...

Quote:
So out of habit, I boot from my win98 CD to a command line. Used Windows fdisk to delete the Windows partition


It looked as if that was the case. 100,000,000 appologies for the insult :)
Back to top
View user's profile Send private message
gojuka
Apprentice
Apprentice


Joined: 18 Oct 2002
Posts: 235
Location: Kingston, Ontario, Canada

PostPosted: Fri Nov 29, 2002 1:21 am    Post subject: Reply with quote

Ah I see. Sorry, by "out of habit" I meant that in the past (and as someone mentioned, it is still best practice) you really wanted to use windows fdisk to munge windows partitions, and linux fdisk to munge linux partitions. My apologies as well!

Nonetheless, dd'ing the start of the partition fixed it.

Mark
_________________
we're outta control
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum