linux installation on 2nd drive, partition advice needed...
Linux - NewbieThis 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
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.
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)
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 06:41 AM.
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?
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)
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.
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
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
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.
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.
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.
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"
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
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.