LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual Boot SUSE 10.0 and Win XP SP2 (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-suse-10-0-and-win-xp-sp2-417510/)

richardguth 02-20-2006 08:19 AM

Dual Boot SUSE 10.0 and Win XP SP2
 
I've been a Windows user for some years now, but always had a nagging feeling/yearning for something a bit different. I'd read a fair bit about Linux and last weekend decided to 'dive in'. I downloaded and burned to cd-rom (5 of them) an installation of SUSE 10.0 (mainly because it looked like this would give me a safe & secure desktop platform).

On installation, the Linux software detected my components correctly and seemed to set up fairly easily (had the odd problem but after reinserting disc 1 the thing carried on from where it left off).

After updating via the 'net, the system was there on the desktop. However, after rebooting, I got an error saying something like....."stage 1.5....grub not found....error 18".

On further investigation, it seems that during install, the boot file(s) were placed on my hard drive in a sector not able to be read at start up.

I messed about with Partition Magic and stuff, only to find not only could I not boot into Linux, but WinXP was unstable too. I had little option (I decided) but to wipe the hard drive clean and reinstall WinXP.

After much investigation, I would recommend the following if you want to have WinXP and Linux available via a dual boot method :

(1) from a clean hard drive (no OS's installed), make a 6Gb partition and install Windows to it (drive c: it will be named)

(2) install all your other essential files to c: (such as graphics and sound drivers, print drivers, etc. This partition will be sufficient for the Windows OS and the other 'bits' - don't put any programmes here!

(3) using either Windows or partitioning software, create a small partition AFTER C: (500Mb is more than enough) but make this a FAT32 type partition. Name this F: or G: or something similar. This will become Linux boot partition. As a technicality, this partition is within the first 8.5Gb and so booting problems won't/shouldn't arise.

(4) using either Windows or partitioning software, create another partition after the last. Make this of NTFS type. This will be used for any Windows programmes and the size will be determined by the hard disk capacity (my 240 Gb hard disk will have 6Gb for C: (WinXP system files), 0.5Gb for F: (Linux boot partition), 80Gb for G: (WinXP programmes).

(5) you can then install Linux AFTER the last drive partition you created and can set a size depending on your hard disk [as in step (4)]. Make sure, during installation, you get Linux to put the boot file (Grub/LILO) on the 500Mb partition you created at step (3).

I'm looking for reassurance from those more experienced than me to look over my 'theory' above and let me know if there is anything else needs adding or anything needs correcting.:newbie:

TruongAn 02-20-2006 08:48 AM

Well, it is really a good plan, but I won't try it on my 30GB hard drive since I don't have enough space.
I partition my in the easiest way, one partion for anyything relation to linux, include boot loader.
About your plan, I think: 100MB for /boot partition is enough.
There is no need to make /boot partition FAT32, you may accidentally erase some file on it in windows, let format any linux partition as ext2 or ext3
If you want to edit files on this partition, you can use a linux live CD or the rescue mode of you own distro.
+ Secondly, with all windows partition formatted as NTFS, you may encounter some problem in sharing file between the two OS, the partition in step 4 should FAT32.

how do you think?

richardguth 02-20-2006 09:13 AM

to recap then....
 
Plan looks OK. With your suggestions it is now -

(1) create first partition and set size at 6Gb in NTFS format (I've already done this on my PC and 6Gb is about right) and install Windows operating system here only.

(2) create second partition after first and of size 100Mb (I found another forum where 50Mb is enough, so 100Mb would be good instead of my initial 500Mb) - if this is being done BEFORE installing Linux, is there a 'preferred' partition type? I considered it should be FAT32 initially when creating it using Partition Magic (or similar) and let Linux reformat this later on installation of Linux.

(3) create third partition after second and use FAT32 format - this allows both Windows and Linux to use files stored here [I read somewhere that is safer to not share files for using on either Win or Linux - but keep them apart. NTFS type would ensure this].

(4) create fourth partition after third for installing Linux OS and files. During installation, make sure GRUB/LILO is installed in partition (2) and NOT MBR!

any thoughts?

pixellany 02-20-2006 09:19 AM

Wow--if all "newbies" were so advanced.....;)

the first new dual-boot scheme that I have seen in a long time.

How does the boot-loader in the mbr (I assume the windows loader is there) get to grub in it's own partition?
In this scheme, what is the significance of grub being in a FAT32 partition?

richardguth 02-20-2006 09:36 AM

dunno....
 
....but I found this on the 'net.....

Install GRUB on the first sector of the /boot partition. DO NOT INSTALL IT ON THE MBR!.

If you are performing the Red Hat installation, for the "Boot Loader Installation" screen:

Select "Use GRUB as the boot loader"
Select Install Boot Loader record on "...First sector of boot partition".

After finishing the Red Hat installation, reboot into Linux. If you don't have a boot disk, try booting in linux rescue mode

If you already have Linux installed:

Run the following command (e.g. assuming /boot is /dev/hda2): grub-install /dev/hda2.

If you don't know which partition contains /boot, run the df command and check the output.

Edit /etc/grub.conf and make sure there is an entry for your version of Windows. For reference, here is a copy of my /etc/grub.conf file.
Determine which partition contains the /boot partition by running the df command. You'll see output like this:

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda3 8665372 1639580 6585612 20% /
/dev/hda2 46636 5959 38269 14% /boot
/dev/hda6 513776 189504 324272 37% /osshare
none 256624 0 256624 0% /dev/shm

From this output, we see that /boot is on /dev/hda2.
Make a copy of the Linux boot sector onto a floppy or onto a FAT32 partition. We'll name this copy linux.bin.

To make a copy onto a floppy:

Mount the floppy drive if it's not mounted (assumes /mnt/floppy exists): mount -t msdos /dev/fd0 /mnt/floppy
Run the following command: dd if=/dev/hda2 of=/mnt/floppy/linux.bin bs=512 count=1
Substitute the path for the if= parameter (the input file) with the appropriate partition from the previous step. E.g., set if= to /dev/hda2.

To make a copy onto a FAT32 (vfat) partition:
Mount the FAT32 partition if it's not mounted yet. If it isn't listed in the df output, it hasn't been mounted yet. Check out steps 3a-3c for mounting a FAT32 partition on the "Share Partitions HOWTO".

Run the following command: dd if=/dev/hda2 of=/osshare/linux.bin bs=512 count=1

Substitute the path for the if= parameter (the input file) with the appropriate partition from the previous step. E.g., set if= to /dev/hda2. Substitute the path for the of= parameter (the output file) with whatever is appropriate for your system. The example here (of=/osshare/linux.bin) is for copying onto a FAT32 partition called osshare.

Reboot into Windows

Copy the linux.bin file to C:\
Run notepad and edit C:\boot.ini. Note that C:\boot.ini is a hidden system file, so it probably won't show up in Windows Explorer. To edit the file, try: Start->Run and enter: notepad C:\boot.ini. Add the following line at the end: c:\linux.bin="Linux"

If your C: filesystem is NTFS (not FAT32), you must edit C:\boot.ini as a user with administrator-level privileges.

To make C:\boot.ini writable, you can either :

Use Explorer:
Go to Tools->Folder Options->View and select Show hidden files and folders and deselect Hide protected operating system files (Recommended).
Right-click on the file, view the Properties and uncheck Read-only. You can now edit the file.
After editing the file, restore the settings to their original state.

Use the command-line:
Make the file writable: attrib -R -S -H C:\boot.ini.
After you've finished editing the file, put the settings back: attrib +R +S +H C:\boot.ini
For reference, here is a copy of my boot.ini file.
Reboot again. You should be able to pick either Windows or Linux. Selecting Linux will start GRUB


...the above refers to RedHat, and I'm hoping this is the same procedure for SUSE 10.0, which is my distro.

TruongAn 02-20-2006 10:08 AM

This trick use windows boot loader (ntldr, I think so) to load both windows and linux.
I won't try that.
Grub interface is much more powerful and beautiful.

By the way richardguth, how long have you been using linux.
It look as if you are even better at linux than me [:D]

richardguth 02-20-2006 12:38 PM

Linux newbie....honest!!
 
I haven't really got into Linux yet - as I said earlier, my first install failed so I'm doing some homework before trying again

richardguth 02-20-2006 12:40 PM

Grub a dub dub
 
How would you suggest setting Grub up once Linux has been installed [and do you agree that this would work]?

victorh 02-20-2006 12:56 PM

I think it's better to have GRUB installed at the MBR. Almost all distros will install it at the moment of the installation of Linux. When it's installing it even recognizes other Operating Systems you have in you box. So it configures itself.

richardguth 02-20-2006 01:31 PM

...and as long as all boot files [for both Win and Linux] are situated within the 1024 boundary [8Gb or so] all will be well?

But how does the boot look when the PC is first turned on?

victorh 02-20-2006 01:44 PM

Mmm, I don't have any problems with GRUB recognizing other OSs that I have in my system. In fact in one of my boxes I have 5 Operating Systems: Windows, Debian Sarge-Sid, Ubuntu and Gentoo. My hard disk has 120 Gb and the partitions have 15 Gb on average (I have separte partitios for the /home directories).

TruongAn 02-20-2006 11:12 PM

You should use grub, it is better, easier.
You just need to install grub once and it will work with any OS you may use.
Grub can function eventhough linux was somehow destroyed.
You can reinstall grub seperately from linux (no need to reinstall the whole distro just because grub problem).

Let windows keep it own boot file, grub can boot windows eventhough win is on NTFS

richardguth 02-21-2006 04:38 AM

...I have a problem
 
Last night, I tried to install Linux SUSE 10.0 using the 5 discs I'd burned after downloading. I already have WinXP on the PC.

After booting from CD, SUSE went into install mode. All seemed OK - until the installation did a reboot after disc 1 and it then gave an error something like...

..stage 1.5...Grub error 18

I believe this is because it has put Grub somewhere outside the 1024 sectors limit (8.5Gb or thereabouts) and so can't launch during reboot.

I had to reinstall Win XP to recreate the MBR or nothing would work. I could have rebooted from SUSE and continued that way [which is what I did last time I tried to set dual booting but still got the error 18 message after installing all of SUSE files and then updating remotely], but my question is -

(1) what do I need to do during SUSE install to make sure that Grub is put in the place to ensure it launches at boot up?

TruongAn 02-21-2006 08:05 AM

Have you installed grub in MBR?
Once you have installed grub in MBR, it can function eventhough you have erase the /boot/grub directory.
Thus, where do you put grub doesn't matter.
I had put grub out side the 8.5GB limit, it worked fine, there is no difference.

richardguth 02-21-2006 08:43 AM

now I'm really confused.........

Grub put into MBR - wouldn't that guarantee it's within the 8.5Gb section? I say this because my BIOS is quite probably one that needs things to be inside this limit, and so my current MBR must reside there.

During install, how do I know that Grub has been directed to be within MBR?

What is the wording?


All times are GMT -5. The time now is 05:04 PM.