• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Boot Loader

I had Linux running on my computer, with a Windows dual boot. It was running Lilo. I reinstalled windows, and Lilo was deleted. How would I set my computer up to be able to dual boot again?
0
wertyk
Asked:
wertyk
  • 6
  • 3
  • 3
  • +3
3 Solutions
 
knollbertCommented:
boot a rescue linux boot disk
run lilo
0
 
knollbertCommented:
Windows, not working well at school?
0
 
MysidiaCommented:
Step 1.  Make a boot disk or boot CD if you don't have one...
which distribution?  Usually a Knoppix or LiveCD is sufficient for this purpose.
Most of the major distributions include a bootable CD (or disk) that is suitable.

Step 2.  Boot the system from the disk.  Follow the instructions
             you may need to type 'rescue' at a boot prompt.

             or (better yet)

             mount root=/dev/hdXX         where /dev/hdXX is where your system's root filesystem
             lives

Step 3.  If you booted in rescue mode (and not directly into your system)
             mount the root filesystem  and chroot the current shell into that filesystem
i.e.   mount /dev/hdXX /mnt
then do
chroot /mnt sh

Next make sure the lilo program and the config file from the host system is visible... if necessary
mount /usr as well (but the lilo program is usually  in the /sbin directory)

Step 4.  Run the lilo command...  if you had it setup as a bootloader, you should already have an
/etc/lilo.conf  on the host system... if not, then you need to write one first

0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
knollbertCommented:
Mysidia's comment is more thorough and should work
Unless you use scsi or SATA in which case
>mount root=/dev/hdXX
becomes
mount root=/dev/sdXX
0
 
LuxanaCommented:
are you sure that lilo was deleted. If the lilo was on /dev/hda2 and you reinstaled windows on /dev/hda1 and windows moved during instalation botable flag from from linux partition /dev/hda2 to /dev/hda1 bios point to /dev/hda1 partitons . In this case all you need to do is move bootable flag back to /dev/hda2 partiton.

in dos it is called active partition you can simple change with fdisk.
0
 
owensleftfootCommented:
Boot from your installation cdrom into rescue mode. When you get to a command prompt run
"chroot /mnt/sysimage" &  "lilo" (without the quotes).
0
 
MysidiaCommented:
Whether active partition would be the major issue depends on whether you choose to
put lilo on the MBR or on the Linux partition

if it's on the MBR, then Windows probably overwrote the boot program
otherwise, active partition is what you need to look at (re-running lilo without resetting
the active partition number won't accomplish much in that case)

0
 
LuxanaCommented:
yes in my comment I assume that if you are running windows and linux on one HDD windows usually take MBR of HDD and lilo is installed on /dev/hda2 first sector. And after reinstalation windows always take bootable flag to its partition.

0
 
wertykAuthor Commented:
is there no way to just put in an entry into boot.ini that will let me boot into linux? i know you can boot into multiple windows partitions this way.
0
 
LuxanaCommented:
boot.ini will not help you to boot linux, first try check which partiton is active and if linux partiton is not active make it active save and try reboot otherways you need to follow some other comments above.
0
 
GnsCommented:
> is there no way to just put in an entry into boot.ini that will let me boot into linux? i know you can boot into multiple
> windows partitions this way.
As a matter of fact, there is... But the caveat is that the tool for it can only work with _partition boot records_ (/dev/hda1 /dev/hda2 in the examples above), so if you have a line "boot=/dev/hda" in /etc/lilo.conf, meaning you install to the primary boot record of the primary IDE master... which probably is your MBR (note above about SCSI/SATA/etc), then you cannot use this method.
You more or less need to know where "boot=..." points to, so the rescue mode boot is probably best anyway:-).

The tool is called BootPart, and it will read out the bootrecord from a partition to a file and update boot.ini to make it visible... Look at http://www.winimage.com/bootpart.htm for DL etc.

-- Glenn
0
 
wertykAuthor Commented:
i have no idea what i'm doing with bootpart

when i run it without any options, it gives me this:

Physical number of disk 0 : f276a3d2
 0 : C:  type=12 , size= 5253223 KB, Lba Pos=63
 1 : C:* type=7  (HPFS/NTFS), size= 20972857 KB, Lba Pos=10506510
 2 : C:  type=5  (Extended), size= 12843967 KB, Lba Pos=52452225
 3 : C:  type=83   (Linux native), size= 6136798 KB, Lba Pos=52452288
 4 : C:  type=5   (Extended), size= 506047 KB, Lba Pos=64725885
 5 : C:  type=82    (Linux swap), size= 506016 KB, Lba Pos=64725948
 6 : C:  type=5    (Extended), size= 4128705 KB, Lba Pos=65737980
 7 : C:  type=83     (Linux native), size= 4128673 KB, Lba Pos=65738043
 8 : C:  type=5     (Extended), size= 2072385 KB, Lba Pos=73995390
 9 : C:  type=b      (Win95 Fat32), size= 2072353 KB, Lba Pos=73995453


0 is the recovery partition
1 is windows
3 is linux boot (the one i want to boot from)
5 is linux swap space
7 is, um, i dont know what 7 is
9 is a fat32 partition i have so i can transfer files between windows and linux


so what do i do now?
0
 
LuxanaCommented:
1 : C:* type=7  (HPFS/NTFS), size= 20972857 KB, Lba Pos=10506510

* = active partition so you are booting to windows

how about try if lilo still exist on your linux partition with make this 3 : C:  type=83   (Linux native), size= 6136798 KB, Lba Pos=52452288 partition bootable.

BTW:

according number of sectors in your partitions seem like you have created extended partition for each partion starts with linux native . So your linux root partitons according this is logical partition /dev/hda5 so there can be a probleme with booting form logical partitons in some circumstancies. One extended partitons as container for rest of them is ok:-)

0
 
GnsCommented:
Well wertyk, do you know that you have a bootrecord for linux installed to one of the linux partitions?
If not, then bootpart will be no use to you.

Luxana: I think the crappy display is just a bootpartism, so nothing to worry about.

-- Glenn
0
 
LuxanaCommented:


glenn: yes this output looks o bit ugly. According original message linux was working before reinstall windows XP so boot record for lilo should be still on first sector of linux /dev/hda5 partition.
0
 
GnsCommented:
> glenn: yes this output looks o bit ugly. According original message linux was working before reinstall windows XP so boot
> record for lilo should be still on first sector of linux /dev/hda5 partition.
Only if put there.

-- Glenn
0
 
LuxanaCommented:
of course, but is worth to just to try :-)
0
 
wertykAuthor Commented:
i just used the linux install disc to reinstall grub. thanks all.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 3
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now