PDA

View Full Version : Boot Manager on NTFS disk



egge
03-04-2006, 01:11 AM
Hi

I just installed Knoppix on my second harddisk (hdb1). But now I have the problem to create a dual boot on my SCSI harddisk (sda1) with NTFS and WinXP. It seems that I can not write on NTFS with lilo.

any hints?

egge

UnderScore
03-04-2006, 01:44 AM
First don't install to HD http://www.knoppix.net/wiki/HD_Install_Warning_not_to_do_it
Second use grub instead of lilo.

egge
03-04-2006, 12:48 PM
Hi

meanwhile I made some progress, but still have problems with the dual boot... I found some information about using the Windows Boot Manger...

I wrote the boot sector in a file using

knoppix@0[knoppix]$ sudo dd if=/dev/hdb1 of=boot.lin bs=512 count=1

this created the file boot.lin, which I copied to a FAT32 partition accessable from Windows. Then I booted Windows and moved boot.lin to c:\ and added in the Windows boot file (boot.ini) the line c:\boot.lin="Knoppix"

After restart I could chose between Windows and Knoppix. Windows works fine, however Knoppix doesn't start (black screen).

Thanks for comments. see below for more information about the partitions (fdisk -l, mount) and the content of /dev/hdb1 (ls).

I never useded grub before.... so if you recomment to use grub, a detailed info would be very nice...
Iis there any chance to use lilo?.. How should the lilo.conf look like? see also below, what it does, if I try it...


egge


knoppix@0[knoppix]$ sudo fdisk -l

Platte /dev/hdb: 15.3 GByte, 15393079296 Byte
255 Köpfe, 63 Sektoren/Spuren, 1871 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes

Gerät boot. Anfang Ende Blöcke Id System
/dev/hdb1 * 1 637 5116671 83 Linux
/dev/hdb2 638 701 514080 82 Linux Swap / Solaris
/dev/hdb3 702 1871 9398025 f W95 Erw. (LBA)
/dev/hdb5 702 1871 9397993+ b W95 FAT32

Platte /dev/sda: 160.0 GByte, 160041885696 Byte
255 Köpfe, 63 Sektoren/Spuren, 19457 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes

Gerät boot. Anfang Ende Blöcke Id System
/dev/sda1 * 1 9730 78156193+ 7 HPFS/NTFS
/dev/sda2 9731 19457 78132127+ f W95 Erw. (LBA)
/dev/sda5 9731 18427 69858621 b W95 FAT32
/dev/sda6 18428 19457 8273443+ b W95 FAT32





knoppix@0[knoppix]$ sudo mount
/dev/root on / type ext2 (rw)
/ramdisk on /ramdisk type tmpfs (rw,size=349896k)
/UNIONFS on /UNIONFS type unionfs (rw,dirs=/ramdisk=rw:/KNOPPIX=ro,delete=whiteout)
/dev/hda on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/UNIONFS/dev/pts on /UNIONFS/dev/pts type devpts (rw)
/proc/bus/usb on /proc/bus/usb type usbfs (rw,devmode=0666)
automount(pid2577) on /mnt/auto type autofs (rw,fd=4,pgrp=2577,minproto=2,maxproto=4)
/UNIONFS/dev/hdb1 on /mnt/hdb1 type reiserfs (rw,nosuid,nodev)



knoppix@0[hdb1]$ ls
bin cdrom dvd floppy initrd mnt opt root sys usr vmlinuz
boot dev etc home lib none proc sbin tmp var





knoppix@0[hdb1]$ sudo cat /etc/lilo.conf
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# --------------- `install-mbr(8)', `/usr/share/doc/lilo/',
# and `/usr/share/doc/mbr/'.

lba32
boot=/dev/hb1
install=/boot/boot-menu.b
backup=/dev/null
map=/boot/map
timeout=100
vga=normal
default=Windows

image=/vmlinuz
root=/dev/hdb1
label=Knoppix
read-write
other=/dev/sda1
label=Windows


knoppix@0[hdb1]$ sudo lilo
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
/dev/mapper/control: open failed: No such device
Failure to communicate with kernel device-mapper driver.
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
/dev/mapper/control: open failed: No such device
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.01.03 (2005-06-13)(compat) and kernel driver
Fatal: raid_setup: stat("/dev/hb1")

nad
03-05-2006, 02:42 AM
The windoze boot manager will not boot a non-windoze operating system. You need to install a different boot manager. Grub would be my first choice, but lilo or any other all-operating-systems friendly product should suffice.

The boot sector does not contain a _filesystem_ as such, therefore, your issue to using lilo in the boot sector is of no consequence.

You have done a remarkable job manipulating the windoze boot manager, unfortunately it is unusable in this instance.

Please search here for several posts regarding installing grub or lilo or search elsewhere for assistance using your other boot manager of choice. From knoppix, you may use the commands man grub or man lilo for an overview of these bootloaders with abbreviated instructions. Grub is very easy to install from the knoppix disk, you just issue the chroot command to change to the root filesystem of your installed operating system and then run the command: grub-install /dev/your_disk_drive (you do have to make certain that a valid /boot/grub/menu.lst file is available). An old lilo.conf of mine follows, it is somewhat self-explanatory:




# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# --------------- `install-mbr(8)', `/usr/share/doc/lilo/',
# and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# | !! Reminder !! |
# | |
# | Don't forget to run `lilo' after you make changes to this |
# | conffile, `/boot/bootmess.txt', or install a new kernel. The |
# | computer will most likely fail to boot if a kernel-image |
# | post-install script or you don't remember to run `lilo'. |
# | |
# +---------------------------------------------------------------+

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
# bios=0x81

#disk=/dev/sda
# bios=0x80

# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda2

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller. Using `compact' is especially recommended when
# booting from a floppy disk. It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a

# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=100

# You can put a customized boot message up if you like. If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress. `single-key' goes with the `alias' lines in the
# `image' configurations below. eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
prompt
timeout=150
# prompt
# single-key
# delay=100
# timeout=100

# Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>)
#
# vga=ask
# vga=9
#
vga=normal

# Kernel command line options that apply to all installed images go
# here. See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""

# Boot up Linux by default.
#
default=Linux

image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1
append="hdc=ide-scsi hdd=ide-scsi"

image=/boot/vmlinuz-2.4.18-k7-crypto-xfs
label=k7-crypto-xfs
read-only
optional
append="hdc=ide-scsi hdd=ide-scsi"

# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
# other=/dev/hda4
# label=HURD
# restricted
# alias=3
other=/dev/hda1
label="Windoz(hda1)"



Post back with any issues. Someone will be happy to help.

egge
03-12-2006, 01:58 PM
Hi

thanks Nad! Meanwhile I managed to install the grub boot manager and I can boot linux. But the dual boot is still not working.

Here is what I have done: istalling and setting up grub, a good help was http://www.gnu.org/software/grub/manual/grub.html
. The menu.lst file (see below) containing both, linux (hd0,0) and windows (hd1,0). I wrote the boot sector to hd(0,0).

In the bios I changed the boot sequence from my Windows HD (hd1) to the Linux HD (hd0). After restart the grub boot manager starts and I can chose between Knoppix and Windows. Knoppix boots fine, but Windows doesn't boot.

I again tried using the windows boot manger as described in my last posting. There windows boots fine, but when trying to boot Knoppix there is only GRUB on the screen and nothing else. Only reset helps...

Thanks again for all comments

egge


cat /boot/grub/menu.lst
title Knoppix
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro ramdisk_size=100000 lang=de apm=power-off nomce vga=791
initrd /boot/initrd.img
savedefault
boot

title Windows XP
root (hd1,0)
makeactive
chainloader +1



cat /boot/grub/device.map
(hd0) /dev/hdb
(hd1) /dev/sda

==>Here is hd0 the Linux HD and hd1 the Windows HD.



fdisk -l

Platte /dev/hdb: 15.3 GByte, 15393079296 Byte
255 Köpfe, 63 Sektoren/Spuren, 1871 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes

Gerät boot. Anfang Ende Blöcke Id System
/dev/hdb1 1 382 3068383+ 83 Linux
/dev/hdb2 383 446 514080 82 Linux Swap / Solaris
/dev/hdb3 447 1871 11446312+ 1b Verst. W95 FAT32

Platte /dev/sda: 160.0 GByte, 160041885696 Byte
255 Köpfe, 63 Sektoren/Spuren, 19457 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes

Gerät boot. Anfang Ende Blöcke Id System
/dev/sda1 * 1 9730 78156193+ 7 HPFS/NTFS
/dev/sda2 9731 19457 78132127+ f W95 Erw. (LBA)
/dev/sda5 9731 18427 69858621 b W95 FAT32
/dev/sda6 18428 19457 8273443+ b W95 FAT32

egge
03-12-2006, 03:20 PM
Hi

fianlly I made it... for Windows it's important to be on the first HD... in my case it was on the second...

the correct menu.lst file is now:


title Knoppix
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro ramdisk_size=100000 lang=de apm=power-off nomce vga=791
initrd /boot/initrd.img
savedefault
boot

title Windows XP
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1
boot



Maybe a closer look to

http://www.gnu.org/software/grub/manual/grub.html

before, would have saved lots of time.

Eckard