LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 12-11-2005, 11:38 AM   #1
st3alth
LQ Newbie
 
Registered: Oct 2005
Location: Indonesia
Distribution: Ubuntu 5.04 in, Slackware 10.2, Debian 3.01
Posts: 5

Rep: Reputation: 0
Wink Need grub hacking :)


Hi everyone, i have a problem with grub..
i have 3 hd, first hd(hda) is my windows partion, and second hd(hdb) i have install slackware, look the fdisk below:

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 2547 20458746 c W95 FAT32 (LBA)
/dev/hdb4 2548 14946 99594967+ f W95 Ext'd (LBA)
/dev/hdb5 2548 6371 30716248+ b W95 FAT32
/dev/hdb6 6372 10195 30716248+ b W95 FAT32
/dev/hdb7 10196 13669 27904873+ b W95 FAT32
/dev/hdb8 13670 13686 136521 83 Linux ===> /boot
/dev/hdb9 13687 14069 3076416 83 Linux ===> /
/dev/hdb10 14070 14136 538146 82 Linux swap
/dev/hdb11 14137 14946 6506293+ 83 Linux ===> /home

and the third hd(hdd) (hdc is my cdrom) i put debian sarge

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 31 248976 83 Linux ====> /boot
/dev/hdd2 32 2434 19302097+ f W95 Ext'd (LBA)
/dev/hdd5 766 867 819283+ 82 Linux swap
/dev/hdd6 32 396 2931799+ 83 Linux ====> /
/dev/hdd7 397 765 2963961 83 Linux ====> /var
/dev/hdd8 868 1887 8193118+ 83 Linux ====> /home
/dev/hdd9 1888 2434 4393746 83 Linux ====> /usr

So, this is the problem. First of all i install windows, then debian, and last slackware (i forget to put debian image in slack lilo.conf). And i want to use grub, but don't know how to configure, when i run "grub-install /dev/hdd" (before that i chroot my debian partion) it output message : "/dev/hdd does not have any corresponding BIOS drive"

this is the contain of my debian menu.lst
--------begin here----------
title Windows 95/98/NT/2000
root (hd0,0)
makeactive
chainloader +1

title Debian GNU/Linux, kernel 2.4.27-2-686
root (hd0,0)
kernel /vmlinuz-2.4.27-2-686 root=/dev/hdd7 ro
initrd /initrd.img-2.4.27-2-686
savedefault
boot

title Slack
root (hd3,7)
kernel /vmlinuz root=/dev/hdb9 ro
savedefault
boot
--------end-----------------

so can anyone give me a clue how to configure my grub??

sorry for my bad english language (still learning english )
 
Old 12-11-2005, 12:07 PM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Before we could put forward advice please confirm

(1) Do you have a bootable Linux? If yes which one is it? We need to see its /boot/grub/menu.lst if its uses Grub or /etc/lilo.conf if it uses Lilo.

(2) Let us know if you have altered the information in the above configuration file. At the moment it is chaotic. Do not alter the "root" statements as you are confusing us with these changes.

Grub counts from 0 so your Debian at root=/dev/hdd7 means the root statement should be

root (2,6)

because the CD drive is not a hard disk and disk (hd2) is the third disk and (hd2,6) should corresponds to your hdd7.

Similarly your slack is at hdb9 and so its root should have been

root (hd1,8)

You can try to amend the above to get it working.

Doing a grub-install /dev/hdd means you want Grub to install itself in the last disk. Grub can't boot from there. Grub needs to be in the first bootable disk MBR to work.

If you are losing the nerve to let a Linux into the MBR (of hda) then place Grub in a floppy by

grub-install /dev/fd0

Just don't tell lies or show amended information to fool us.
 
Old 12-11-2005, 12:48 PM   #3
st3alth
LQ Newbie
 
Registered: Oct 2005
Location: Indonesia
Distribution: Ubuntu 5.04 in, Slackware 10.2, Debian 3.01
Posts: 5

Original Poster
Rep: Reputation: 0
well,

(1) as i say, i install windows first, then debian, and last slackware. so i boot from slack (it use lilo), but i want to use grub, so i edit the menu.lst that belong to debian.

oh, my mistake if i give a wrong information (still learning)

so i change "root (hd3,7)" with this one "root (hd1,8)"???, then what did i do then??
run "grub-install /dev/hda"??

pls replay
 
Old 12-12-2005, 09:58 AM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
OK that clears up a bit once you confirming booting to Slackware.

These are the instruction after you boot to Slackware, log in as root (type su in Bash shell)

mkdir /mnt/temp <---make a temp directory inside Slackware's /mnt
mount /dev/hdd7 /mnt/temp <----mount Debian's root on the temp partition just created
chroot /mnt/temp <---- Jump from Slackware into Debian
edit Debian's /boot/grub/menu.lst to put back the correct root statements as instructed
grub-install /dev/hda <---- replicate Debian Grub boot loader into MBR
exit <-----jump from Debian back to Slackware
reboot <------The PC should boot up Debian's Grub
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacking GRUB via copying MBR, need to find address of Stage2 Feebles Linux - Software 1 12-11-2005 12:20 PM
Hacking Exposed Wireless Hacking Chapter prompt Linux - Wireless Networking 0 05-08-2004 02:44 PM
hacking moeminhtun General 1 01-09-2003 04:39 AM
Hacking... TimDimman Linux - Newbie 5 02-12-2002 03:11 PM
in how many was hacking is done ashis Linux - Security 5 06-15-2001 05:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration