UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
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.
After too many unsuccessful attempts to count to get Breezy Badger to dual-boot Windows XP on this HP notebook, I was amazed how a clean Install CD exclusively to /dev/sda - including putting GRUB on that external drive Linux partition - on an external FireWire 160GB Seagate disk also clobbered the OSshare FAT32 partition I'd carefully partitioned on internal IDE drive. 30GB IDE disk had been partitioned in Windows XP/Partition Magic so:
Code:
/dev/hda1 pri FAT16 small hidden HP Factory install for recovery
/dev/hda2 pri ntfs * WinXP boot partition, about 20GB
/dev/hda5 Logical FAT32 rest of disk about 9GB for OS sharing
Used a place-holder 30GB ntfs partition from Windows right at start of external drive to be able to let Ubuntu 5.10 LiveCD delete and then 'guided partitioning' all first partition's free space to get:
Code:
/dev/sda1 pri ext3 / Linux partitioned boot, about 29GB
/dev/sda4 pri swap Linux configured swap, about 1G
/dev/sda2 pri FAT32 already existing earlier from Windows
/dev/sda5 Logical ntfs ditto
/dev/sda6 Logical ntfs ditto
/dev/sda7 Logical ntfs ditto
Tried to copy first 512 bytes of /dev/sda with command as root during install
Code:
dd if=/dev/sda1 of=bbboot.bin bs=512 count=1
hoping to be able to later copy this bbboot.bin file to /dev/hda5 FAT32 and then in WindowsXP write it to C: root directory after altering Windows boot.ini script to be able to use ntldr to dual-boot - adding
Code:
C:\bbboot.bin="Start Ubuntu BREEZY BADGER"
Result of my dd command only successful if output file is Linux / as above. If attempt to output examples of=/dev/sda2/bbboot.bin (a vfat that doesn't seem to be mounted) or of=/dev/hda5/bbboot.bin or anywhere like to a of= floppy, I'm told 'bbboot.bin is not a directory'
OK, also tried to mount/dev/hda5 at some point too.
Feeling lost I reboot Windows and discover /dev/hda5 Windows FAT32 partition is no longer formatted and all files on it had disappeared. I had back-ups mirrored on an external disk partition so I reformatted /dev/hda5 again as FAT32 in WindowsXP Disk Mgt.
Obviously am doing a bunch of things wrong. Can anyone help, you know baby steps, spelling it out line by line? Thanks.
Obviously.
Maybe you should change the thread title. It ain't the "Breezy Install CD" that destroyed that partition - one more guess as to who might be the responsible party.
dd is the gun, you shot yourself in the foot. Full points for the backup - you're one of the few that plan ahead that well.
The mistake you made was to have the outfile point to a physical resource - in your case a partition.
This overwrites from the start of the partition - rather than using any filesystem that might be defined on said partition.
What you need to do is use a mountpoint reference for the of; something like
"of=/mnt/floppy/bbboot.bin" or "/mnt/shared/bbboot.bin" - whatever is appropriate (and mounted). df command will tell you what you have to work with.
Many thanks, syg00, for schooling. Very helpful.
Tell me how to change thread title and I'll happily do so to "DD can destroy a FAT32 partition" but LQ Edit only lets posters edit the body of posts, not thread title.
You're welcome - hope you get it to work. HP can apparently be a pain, but you should be able to get grub to boot everything. Regardless, the strategy you're pursueing should work fine.
As for dd, it can destroy any partition. Not to mention whole disks - handy tool, but brutal ...
If I can rob your next two seconds, please confirm this command sequence will do the trick next time try Ubuntu 5.10 Install CD (during install, in root shell)
Code:
mkdir /mnt/hda5 #create mountpoint for IDE Windows C: FAT32 partition
mount -t vfat /dev/hda5 /mnt/hda5
dd if=/dev/sda1 of=/mnt/hda5/bbboot.bin bs=512 count=1
cp /mnt/hda5/bbboot.bin /dev/hda5 #hopefully keeps IDE FAT32 partition intact
umount /mnt/hda5
then find bbboot.bin Windows XP FAT32 partition, copy to C: and alter boot.ini
Remove the copy - dd will create the file correctly on the vfat partition.
As you described, the copy (to C: ) is done once you reboot XP.
You probably shouldn't need the type switch in the mount command either, but won't do any harm by using it.
Ta very much, syg00.
I'll take a crack at this tomorrow, time permitting.
[EDITED 12-09-2005]
For what it's worth, as installed Madriva Linux 2006 on external 160GB FireWire this is probably not the forum to continue this thread, I've still got ways to go to dual-boot with Windows XP.
Thanks to syg00 for teaching me Mountpoints, DD worked fine. GRUB threw an Error 17 when selecting 'Start Mandriva Linux' in NTLDR boot option. So loaded Ubuntu Breezy LiveCD to mount external drive / then startx.
Xorg stopped that. Wonder if it's because LiveCD won't release screen?
I've copied a bunch of things I did if anybody wants to chip in here. First time tried launch Mandriva 2006 on external /dev/sda5 during Ubuntu 5.10 LiveCD session. Any line separators are for readability.
Code:
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1 0 0 Empty
Partition 1 does not end on cylinder boundary.
/dev/sda2 3825 7776 31744440 c W95 FAT32 (LBA)
/dev/sda3 1 19457 156288321 f W95 Ext'd (LBA)
/dev/sda5 1 764 6136767 83 Linux
/dev/sda6 7777 11728 31744408+ 7 HPFS/NTFS
/dev/sda7 11729 15552 30716248+ 7 HPFS/NTFS
/dev/sda8 15553 19457 31366881 7 HPFS/NTFS
/dev/sda9 765 904 1124518+ 82 Linux swap / Solaris
/dev/sda10 905 3824 23454868+ 83 Linux
Partition table entries are not in disk order
Disk /dev/hda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 2 9 64260 84 OS/2 hidden C: drive
/dev/hda2 * 10 2553 20434680 7 HPFS/NTFS
/dev/hda3 2554 3648 8795587+ f W95 Ext'd (LBA)
/dev/hda5 2554 3648 8795556 b W95 FAT32
==================================================
ubuntu@ubuntu:~$ sudo mkdir /mnt/BreezyBadger
ubuntu@ubuntu:~$ sudo mount -t ext3 /dev/sda5 /mnt/BreezyBadger
ubuntu@ubuntu:~$ sudo chroot /mnt/BreezyBadger
bash-3.00# startx
hostname: Host name lookup failure
xauth: error in locking authority file /home/ubuntu/.serverauth.27699
xauth: error in locking authority file /home/ubuntu/.Xauthority
xauth: error in locking authority file /home/ubuntu/.Xauthority
xauth: error in locking authority file /home/ubuntu/.Xauthority
xauth: error in locking authority file /home/ubuntu/.Xauthority
This is a pre-release version of the The X.Org Foundation X11.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the The X.Org Foundation "monolithic tree" CVS
repository hosted at http://www.freedesktop.org/Software/xorg/
X Window System Version 6.8.99.900 (6.9.0 RC 0)
Release Date: 01 August 2005 + cvs
X Protocol Version 11, Revision 0, Release 6.8.99.900
Build Operating System: Linux 2.6.12-12mdksmp i686 [ELF]
Current Operating System: Linux ubuntu 2.6.12-9-386 #1 Mon Oct 10 13:14:36 BST 2005 i686
Build Date: 16 September 2005
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Dec 9 11:40:32 2005
(==) Using config file: "/etc/X11/xorg.conf"
Using vt 8
(EE) No devices detected.
Fatal server error:
no screens found
Please consult the The X.Org Foundation support
at http://wiki.X.Org
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"
after 0 requests (0 known processed) with 0 events remaining.
xauth: error in locking authority file /home/ubuntu/.Xauthority
-------------------------
bash-3.00# cat /etc/fstab
/dev/sda5 / ext3 noatime 1 1
/dev/sda10 /home ext3 noatime 1 2
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
/dev/sr0 /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
/dev/hda2 /mnt/win_c ntfs umask=0,nls=iso8859-1,ro 0 0
/dev/hda5 /mnt/win_d vfat umask=0,iocharset=iso8859-1,codepage=850 0 0
/dev/sda6 /mnt/win_d2 ntfs umask=0,nls=iso8859-1,ro 0 0
/dev/sda7 /mnt/win_e ntfs umask=0,nls=iso8859-1,ro 0 0
/dev/sda8 /mnt/win_f ntfs umask=0,nls=iso8859-1,ro 0 0
/dev/sda2 /mnt/win_g vfat umask=0,iocharset=iso8859-1,codepage=850 0 0
none /proc proc defaults 0 0
/dev/sda9 swap swap defaults 0 0
bash-3.00# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 6040256 1832080 3901340 32% /
-------------------------
bash-3.00# cat /boot/grub/menu.lst
timeout 15
color black/cyan yellow/cyan
default 0
title linux
kernel (hd0,4)/boot/vmlinuz root=/dev/sda5 resume=/dev/sda9 splash=silent vga=788
initrd (hd0,4)/boot/initrd.img
title linux-nonfb
kernel (hd0,4)/boot/vmlinuz root=/dev/sda5 resume=/dev/sda9
initrd (hd0,4)/boot/initrd.img
title failsafe
kernel (hd0,4)/boot/vmlinuz root=/dev/sda5 failsafe resume=/dev/sda9
initrd (hd0,4)/boot/initrd.img
title windows
root (hd1,1)
map (0x81) (0x80)
map (0x80) (0x81)
makeactive
chainloader +1
title windows1
root (hd0,1)
chainloader +1
-------------------------------------------------
bash-3.00# ls /boot/grub
device.map ffs_stage1_5 jfs_stage1_5 menu.lst.example stage1 vstafs_stage1_5
e2fs_stage1_5 install.sh mdv-grub_splash.xpm.gz minix_stage1_5 stage2 xfs_stage1_5
fat_stage1_5 iso9660_stage1_5 menu.lst reiserfs_stage1_5 ufs2_stage1_5
bash-3.00# grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97-13mdk (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> find /boot/grub/stage1
(hd1,4)
grub> root (hd1,4)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd1,4)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd1,4)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd1,4)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd1,4) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.
grub> quit
Further, cfdisk said I had a problem in external partition #2 then quit.
May be interesting to do another Ubuntu Breezy Install CD install in lieu of the Mandriva 2006 but frankly am getting impression Linux partitioners are encountering problems Windows XP Disk Management doesn't face with this external FireWire Seagate ST316002 disk. Probably a Linux FireWire or USB 2.0 driver issue as IEEE1394a disk access seems to share a lot of USB2.0, SCSI common protocol or code.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.