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 11-08-2005, 07:23 AM   #1
Billydakid
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Rep: Reputation: 0
linux installation on 2nd drive, partition advice needed...


Hi there ppl,

just decided to start again from scratch installing Suse 10 Linux on my 2nd hard drive after failing to get the dual boot from the winxp ntldr on drive 1. Been awhile since I installed Linux on a PC before this scenario, so I know I'm prolly doing some thing(s) wrong. Here's what I did last time:

Drive 1 already contains Winxp and must remain untouched as this is not my system
/dev/sda1 /windows/C = 232gb (NTFS)


Drive 2 contains Suse 10 as follows:

Linux native primary partition
/dev/sdb1 /boot = 32mb (Linux native)

Swap partition
/dev/sd3 /swap = 4gb (Linux swap)

Fat32 partition
/dev/sdb4 /windows/D = 186gb (FAT32)

Linux LVM partition = 42gb
/dev/system/root ext2 /root = 14gb (LV)
/dev/system/usr ext2 /usr = 8gb (LV)
/dev/system/var ext2 /var = 1gb (LV)
/dev/system/opt ext2 /opt = 4gb (LV)


used this to copy the bootsect:
# dd if=/dev/sdb of=/tmp/bootsect.lnx bs=512 count=1

copied bootsect/lnx to fat32 partition

booted into WinXP and copied bootsect.lnx into C:\

added to the last line of the WinXP boot.ini
C:\bootsect.lnx="Suse 10 Linux"


Firstly, WinXP will boot fine but I get the "GRUB" text displayed when selecting to boot to "Suse 10 Linux" from the ntdlr boot menu.

The only way to boot into Suse 10 Linux is using the CD1 installation disc,
select installation
select boot to installed system.


Any help would be much appreciated as I know this problem will prolly not be solved by a fresh installation due to me making the same mistakes in the process.

Thanks already.

Last edited by Billydakid; 11-08-2005 at 07:41 AM.
 
Old 11-08-2005, 07:28 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
why not use Grub to boot both systems?
 
Old 11-08-2005, 07:57 AM   #3
Billydakid
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Good question, but it's not my system and i'm not permitted to do that unfortunately. Therefore, I can't make any big changes to it.

Suse 10 will be installed on drive 2 temporarily until I'm back on my own system, meaning that when Suse is removed it wont affect WinXP at all. I'll only need to uncheck 1 box in WinXP that will show/hide the Operating System display menu on boot up

When I'm back on my own system eventually, I'll prolly do just that anyway thx.

So I take it that the set up looked ok as you've not mentioned any problems with the Suse 10 Linux partitions or anything else?


Thanks already.
 
Old 11-08-2005, 09:07 AM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
The problem seems to be the grub-installation, shouldn't be too difficult to fix.
Post your grub.conf, /etc/fstab and output of 'fdisk -l'
 
Old 11-08-2005, 09:30 AM   #5
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
Quote:
Linux native primary partition
/dev/sdb1 /boot = 32mb (Linux native)

Swap partition
/dev/sd3 /swap = 4gb (Linux swap)
Shouldn't the /boot partition be larger? (100 MB)
And the swap partition much smaller? (512 MB)

You probably also want a separate /home partition. Always easy when (re-)installing a linux distro.
 
Old 11-08-2005, 10:19 AM   #6
Billydakid
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the reply pingu, here's what you asked for:

grub.conf

root(hd1, 0)
install -stage2=/boot/grub/stage2 /grub/stage1 (hd1 ,0) /grub/stage2 0x8000 (hd1, 0)/grub/menu.lst
quit


fdisk -l

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 30393 244131741+ 7 HPFS/NTFS


Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 4 32098+ 83 Linux
/dev/sdb2 5 5487 44042197+ 8e Linux LVM
/dev/sdb3 5488 6010 4200997+ 82 Linux swap / Solaris
/dev/sdb4 6011 30337 195406627+ c W95 FAT32 (LBA)


Thanks already.
 
Old 11-08-2005, 11:00 AM   #7
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
First the good news. If you get a Grub prompt then you are half way there as you can boot Suse up manually by Grub prompt.

To check if you have Grub prompt, type help to see if a set of commands is available.

I haven't found a PC system that cannot be booted by a Grub prompt yet, so a Grub prompt is a good sight.

Second is the bad news. Your menu.conf is incomplete. Grub control booting by /boot/grub/menu.lst and not menu.conf. So list it out here.

To assist you to boot Suse manually we need the name of the kernel and initrd files name so do a

ls /boot

to show the files inside.

You can boot it up yourself in Grub prompt with 3 to 4 lines as follow

root (hd1,1)
kernel (hd1,0)/boot/vmlinuz..... ro root=/dev/sdb2
initrd (hd1,0)/boot/initrd....
boot

Grub counts from 0 so root (hd1,1) is the second partition of your second disk--->sdb2. The kernel name always starts with vmlinuz and initial ram disk with initrd. The last boot command will give Grub the green light to fire up Suse.

Just substitute vmlinuz..... and initrd.... with the kernel and initrd files names you find in the /boot directory.

If you manage to boot up Suse, make a bootable floppy by typing

grub-install /dev/fd0

at root terminal, so that you can have Suse by booting to the floppy and without the floppy you boot to XP.

We can advise from then how to make XP to boot Suse.

You are on the right track but Suse need to be repaired first.
 
Old 11-08-2005, 12:02 PM   #8
Billydakid
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the reply saikee,

firstly I do get a grub prompt from typing "grub" (whilst Suse is running) in a terminal. so good news there. I don't know where to find menu.conf, could you point me in the right direction plz?

/boot/grub/menu.lst
# Modified by YaST2. Last modification on Tue Nov 8 16:08:15 GMT 2005

color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd1,0)/message

###Don't change this comment - YaST2 identifier. Original name: linux###
title SUSE LINUX 10.0
root (hd1,0)
kernel /vmlinuz root=/dev/sda1 vga=0x31a selinux=0 resume=/dev/sdb3 splash=silent
showopts
initrd /initrd

###Don't change this comment - YaST2 identifier. Original name: windows###
title Windows
chainloader (hd0,0)+1

###Don't change this comment - YaST2 identifier. Original name: floppy###
title Floppy
chainloader (fd0)+1

###Don't change this comment - YaST2 identifier. Original name: failsafe###
title Failsafe - SUSE Linux 10.0
root (hd1,0)
kernel /vmlinuz root=/dev/system/root vga=normal showopts ide=nodma apm=off acpi=of noresume selinux=0 nosmp noapic maxcpus=0 edd=off 3
initrd /initrd


ls /boot
. symvers-2.6.13-15-i386-xen.gz
.. vmlinux-2.6.13-15-smp.gz
System.map-2.6.13-15-smp vmlinux-2.6.13-15-xen.gz
System.map-2.6.13-15-xen vmlinuz
backup_mbr vmlinuz-2.6.13-15-smp
boot vmlinuz-2.6.13-15-xen
config-2.6.13.15-smp vmlinuz-xen
config-2.6.13.15-xen xen-3.0.gz
grub xen-3.0_6715-2.gz
initrd xen-3.gz
initrd-2.6.13-15-smp xen-pae-3.0.gz
initrd-2.6.13-15-xen xen-pae-3.0_6715-2.gz
initrd-xen xen-pae-3.gz
lost+found xen-syms
memtest.bin xen-syms-3.0_6715-2
message xen-syms-pae-3.0_6715-2
symvers-2.6.13-15-i386-smp.gz xen.gz

Thanks alot for the info, it's beginning to make sense to me. However, I'm still not there yet but at least I'm finally learning some of this.


Thanks already.
 
Old 11-08-2005, 12:44 PM   #9
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
No Grub prompt is at the booting stage before a system is loaded.

You can run Grub shell after Linux has been booted but that is a different thing.

Now do check my post on making a bootable Grub floppy and confirm if Suse can be booted by it.

If your Grub bootable floppy works then

grub-install /dev/sdb1

can put Grub inside sdb1 root partition and your original procedure would work if you

dd if=/dev/sdb1 of=/tmp/bootsect.lnx bs=512 count=1

I think sdb1 occupies the same position as sdb but straightly speaking XP boot a partition and not the whole disk.

I don't use more than 1 partition for a Linux and have been avoiding LVM. Your menu.lst suggests that your root partition is (hd1,0) or sdb1 which is your /boot and not /. Thus I cannot confirm if your menu.lst will get through but do give it try with booting off by the floppy. The floppy method concludes if your current menu.lst need changes or not.

If the floppy method doesn't work then I suggest you to alter sdb1 to sdb2 in the first booting choice.

-----------------------------------------------

Finally this is how you can create a bootable Grub floppy unattached to a system so that you can boot to a Grub prompt

(1) Boot up Suse using the existing method
(2) Log is as root, click terminal
(3) Pop a floopy into the drive
(4) Type

dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1

This floppy can boot any system. The previous bootable Grub floppy created by grub-install statement has Suse attached to it. So be aware of the difference

To boot you XP, boot the floppy to Grub prompt and type

root (hd0,0)
chainloader +1
boot

If you manage to install Grub in sdb1 then changing (hd0,0) to (hd1,0) will boot up Suse immediately.

--------------------------------------------------

Steps to boot up Suse when everything fails but you have a bootable Grub floppy unattached to an operating system

(1) Boot up the Grub floppy
(2) Type

root (hd1,0)
kernel /boot/vmlinuz ro root=/dev/sdb2
initrd /boot/initrd
boot

The above should work, if not change sdb2 to sdb1 should do it.

Enjoy the power of booting Grub manually

Last edited by saikee; 11-08-2005 at 12:45 PM.
 
Old 11-08-2005, 03:13 PM   #10
Billydakid
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Hi again saikee,

now infront of machine again and will still here now until this is all sorted.

when i entered this into the grub prompt during suse running via terminal i get this:

grub> root (hd1,0)
returns
grub> ystem type is ext2fs, partition type0x83

grub> kernel (hd1,0)/boot/vmlinuz ro root=/dev/sdb2
returns
grub> nux-bzImage, setup=0x1e00, size=0x198ab0]

grub> initrd /boot/initrd
returns
grub> 16: Inconsistent filesystem structure

I did try to use the filenames as you requested but had no luck, there so I tried these to se what they would return.

I tried:
grub> kernel (hd1,0)/boot/vmlinuz-2.6.13-15-xen
returns
grub>

and
grub> initrd /boot/initrd/xen-3.gz
returns
>grub 16: Inconsistent filesystem structure

Would reinstalling Suse with 1 partition make this all alot simpler?

Another thing, if I chose to only use 1 partition for Suse and another for the swap and another for the fat32 (which is what i think you meant by only using 1 partition for linux?), is everything else created automatically? i.e mount points, volumes that exist within a linux partition /usr /var /opt so on. Or are these just virtual mount points and nothing more if you choose to only use 1 partition for linux?

Sorry for all the questions, your method makes alot more sense and i bet it isn't as problematic as mine.


Thanks already.
 
Old 11-08-2005, 04:14 PM   #11
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
Sorry if I haven't made it clear. Grub prompt inside a Suse shell (which is what you are reporting) is not the same as booting from the begining!

Grub shell = You use Grub inside Suse. The Linux has already been booted and all booting commands will be ignored by Grub

Grub prompt = You have no system booted except Grub itself. This corresponds to Grub "unattached" to an operating system. In such a case you can use Grub to boot any system manually. Please read my reply carefully. I know it is a bit confusing but you must try to understand the difference.

This gives a detailed explanation. You can read it when you have a bit of time.

I don't think it is necessary to re-install Suse just to put all of them inside one partition, which is easy to maintain. You still have all the directories but you can address everything by /. At the moment you need to tell Grub the kernel and initrd are in /boot and / is somewhere else. I suggest you persist untill you successfully dual boot the two systems. With one partition you don't need to mount any /usr, /var... because they are available by default from the Grub statement of root=(hdi,j) statement. You only mount a partition external to Suse, like from another LInux or Windows.

If you want to try to boot the two systems manually follow the section of making a bootable Grub floppy "unattached" to an operating system. Have it made first, boot it up and follow the steps of your last post.

You should get a different response this time.

Last edited by saikee; 11-08-2005 at 04:17 PM.
 
Old 11-09-2005, 03:54 PM   #12
Billydakid
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Hi again ppl, thanks for all the help so far.

I decided to reinstall Suse 10 Linux just to make things more simplistic for me as this may make a difference to me in the short/long term.

Now I have:
drive 1 (same as before) = sd1
winxp (ntfs) = sda1

drive 2 = sdb
/dev/sdb1 Suse partitition mount /
/dev/sdb2 swap partition mount swap
/dev/sdb3 fat32 partition mount /windows/D


have managed to create a floppy boot disc (trouble free this time) that will let me boot either operating system via the GRUB boot loader menu.

I also entered those 4 lines of code to run from within GRUB of which created no errors this time.

I went into the drive order and switched it so that it looked like this:
sdb
sda

which then on reboot would go straight into the GRUB prompt. I then ran those same 4 lines of code from this GRUB prompt and then successfully booted into Suse.

I then changed the order back as I wasn't too sure how to take this any further. However my guess is that what is required for me to be able to boot both WinXP and Suse 10 Linux from the ntldr, is to somehow:

create a grub.conf that will boot up from drive 1 (sda) ntldr
then create a floppy containing the bootsector
copy the bootsector to C:\ on drive 1
modify boot.ini adding C:\bootsector.lnx="Suse 10 Linux"

Is this what is required?


Thanks already.
 
Old 11-09-2005, 04:36 PM   #13
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
Let me understand what you have got so far.

You have reinstalled Suse in sdb1. XP is in sda1. Original XP's MBR untouched.

You have made a Suse bootable floppy that can boot either system successfully.

I am at loss with the following

---------------------------------------------

I also entered those 4 lines of code to run from within GRUB of which created no errors this time.

I went into the drive order and switched it so that it looked like this:
sdb
sda

which then on reboot would go straight into the GRUB prompt. I then ran those same 4 lines of code from this GRUB prompt and then successfully booted into Suse.
--------------------------------------------------------------------------------

My guess is you may have inadvertently damage the Suse bootable floppy so that Grub's menu.lst becomes inoperational. In that case Grub will boot to a Grub prompt. Since I have given you the commands to boot Suse manuall so you managed to boot up Suse.

The above success is due to a defective /boot/grub/menu.lst! Possibly by doing something to the disk order.

OK lets move forward & remeber the following

(1) Original Suse floppy book either Suse or XP
(2) Floppy is accidenally damage can boot to a Grub prompt and now I know how to use Grub prompt to boot Suse manually

If you can boot Suse with Grub prompt then it is even easier to boot XP, just type

root (hd0,0)
chainloader +1
boot

Can you please try this out in a Grub prompt so that you know how to boot both systems manually?

-----------------------------------------

Now on the part of using ntldr to boot both

Your last 3 steps are perfect. There is a misunderstanding in Step 1.

What you need is to put Grub inside sdb1 or in root partition of Suse. This you can do while log in as root in a Suse terminal to type

grub-install /dev/sdb1

The information that XP need is the first 512 bytes of sdb1 which you can obtain by popping a floppy in the drive and type

dd if=/dev/sdb1 of=/dev/fd0/bootsector bs=512 count=1

Thereafter proceed with your last two steps.

---------------------------------------------------------------------------

Before I leave you in peace I would like to tell you that the "grub-install /dev/sdb1" will now make Suse chainloaderable.

In future manual booting Suse can be booted with the same instructions as XP but with change in the partition reference.

Root (hd1,0)
chainloader +1
boot

There is no need to mention kernel and Initrd from this point onward!

Since you are keen in using ntldr so please continue but I hope this thread has demonstrated to you that Grub is easier, simpler and more powerful.
 
Old 11-09-2005, 07:23 PM   #14
Billydakid
LQ Newbie
 
Registered: Nov 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Hi again saikee, thanks for sticking this out with me.

Quote:
Let me understand what you have got so far.

You have reinstalled Suse in sdb1. XP is in sda1. Original XP's MBR untouched.

You have made a Suse bootable floppy that can boot either system successfully.
correct.


Quote:
I also entered those 4 lines of code to run from within GRUB of which created no errors this time.

I went into the drive order and switched it so that it looked like this:
sdb
sda

which then on reboot would go straight into the GRUB prompt. I then ran those same 4 lines of code from this GRUB prompt and then successfully booted into Suse.
ignore that sorry, must have got mixed up with the floppy discs


Quote:
If you can boot Suse with Grub prompt then it is even easier to boot XP, just type

root (hd0,0)
chainloader +1
boot

Can you please try this out in a Grub prompt so that you know how to boot both systems manually?
i couldn't even boot with the grub floppy i created (which is unattached to suse) via:
dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 1.27658 seconds, 0.4 kB/s

dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1
197+1 records in
197+1 records out
100948 bytes (101 kB) copied, 6.29353 seconds, 16.0 kB/s

instead I got the following message:
GRUB loading stage2Geom error

Do I need to fix grub or something?

Also, I'd just like to mention that when I get back on my own system I will be using grub as it's just like you say - easier and alot more powerful. Thanks for showing me the light Saikee.


Thanks already.
 
Old 11-09-2005, 08:01 PM   #15
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, May be you should try the traditional method of locating the original source of stage1 and stage2 files by asking Linux to find it for you. So while in Suse do a

find / -name stage1

The record I kept indicates Suse 9.3 keeps these two files in /usr/lib/grub/i386-suse directory. You then cd to the directory located by the find command and do the two dd statements again, with /boot/grub dropped, i.e.

dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1

That is the method recommended by "Linux in a nutshell" and also the "Grub Manual" but I alway grab the two files from the /boot/grub directory as they work OK.

The Grub floppy unattached to an operating system is the best thing I found in Linux so it pays to have one. I can use this floppy to boot DOS, every Windows, every Linux, every *BSD and even Solaris, using the same 3 lines of commands I gave you. Once you know how to use Grub to boot a system manully then you will laugh at its simplicity.

It is cool too because according to M$ XP cannot be booted from a floppy! ntldr can also boot one DOS-based system (one from DOS, Win3x & Win9x) with XP but Grub can boot every PC system M$ has produced in the same box.
 
  


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
How to remove grub + linux partition from drive? No longer needed. Boggit Linux - General 7 11-09-2008 01:29 AM
Added a 2nd Sata Drive installed Fedora Core 5, BIOS Doesn't See 2nd Drive. mtmcc1 Linux - General 3 12-03-2005 05:01 PM
Reseizing linux partition? (Advice needed) OneManArmy Linux - Newbie 8 05-03-2004 01:01 AM
help mounting 2nd partition on WinXP drive harnadem Linux - Newbie 2 03-21-2004 10:38 AM
how to: mount existing partition on 2nd drive atljam Linux - General 2 07-28-2002 01:32 PM


All times are GMT -5. The time now is 08:50 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