Sponsored Content
Full Discussion: Bootloader problem Grub.
Top Forums UNIX for Dummies Questions & Answers Bootloader problem Grub. Post 302356505 by blabla9002 on Friday 25th of September 2009 06:17:03 PM
Old 09-25-2009
I can't find grub.conf. I found out via google that you might need menu.lst from that map.

Quote:
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=4a035627-91aa-48c6-9269-0361d4ada14d resume=UUID=5ddb403f-613a-435b-be01-d191dbac14d6 splash=silent vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=4a035627-91aa-48c6-9269-0361d4ada14d resume=UUID=5ddb403f-613a-435b-be01-d191dbac14d6
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=4a035627-91aa-48c6-9269-0361d4ada14d failsafe
initrd (hd0,0)/boot/initrd.img

title windows
root (hd2,0)
map (0x82) (0x80)
map (0x80) (0x82)
makeactive
chainloader +1
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grub problem- keeps rebooting as soon as it tries to do grub

Hi, I installed solaris 10 a few weeks ago. It was working fine during the past two weeks. However, now when I start to load to the drive, I get this problem: The BIOS screen comes up like normal, then screen goes blank and a message "Grub loading stage 2" flashes real quick then the computer... (1 Reply)
Discussion started by: moesays
1 Replies

2. Solaris

grub problem

hi to all ,pls help me i am using p4 intel machine while trying new things my image of solaris boot have been deleted from grub now i want to boot solaris 10 from the grub command line but i don't know the command for this .please help me as i want to know solution for... (8 Replies)
Discussion started by: tiwsaj
8 Replies

3. Solaris

Grub problem

Hi friends, i am using inter pc i am using windows as well as unix in 2 different HDD when i restart from windows to unix my grup got some problem, Grub loading, please wait Error 22 (and hang here is there any way to recover my grup please.) (2 Replies)
Discussion started by: kurva
2 Replies

4. Linux

Bootloader problem Grub.

Hello, I have some questions about my Mandriva Linux. My father died last year and so I got automatically forced to use Linux (master computer). I have become a little bit known with it, had to reset the root password via command lines etc. But I have some problems I can't solve on my own. In... (0 Replies)
Discussion started by: blabla9002
0 Replies

5. Solaris

grub problem

hi , was using solaris in dual boot with xp , then I ' ve installed ubuntu too . The solaris grub has been in some way damaged , maybe because during the linux installation i've delete an old partition that I was not using by some months. It's normal that the solaris grub has been overriden by... (7 Replies)
Discussion started by: freeware
7 Replies

6. Solaris

Problem at GRUB prompt

Hi, I have a SUNFIRE V40Z server with Solaris 10 i86pc platform. I am experiencing probkem at GRUB prompt. I have restarted my server thrice but it is getting stuck at GRUB. Moreover it is not accepting any key stroke from my keyboard. I am able to enter BIOS and navigate around. Please... (7 Replies)
Discussion started by: EmbedUX
7 Replies

7. Ubuntu

Grub rescue problem after installing ubuntu 10.04 amd64 after i386

Hi all, I have Windows XP dual boot with Ubuntu 8.10 on my system. I brought in a portable HDD on which I installed Ubuntu 10.04 32-bit. The grub boot loader was installed along with this and to boot windows, I've had to plug in the HDD (with lucid install) everytime. It had been working fine.... (0 Replies)
Discussion started by: morningSunshine
0 Replies

8. Ubuntu

grub problem - unable to boot

I am not able to boot into my ubuntu. Grub gives me this message How do I boot linux? (6 Replies)
Discussion started by: locoroco
6 Replies

9. Red Hat

Can we specify which grub.conf to use in grub-install.

Hi, Can we specify which grub.conf to use while installing grub on RHEL. We are working on application which requires different grub configurations needed, depending on certain criteria we need to update grub with correct grub.conf. Can we use grub-install for this purpose? (4 Replies)
Discussion started by: successlin
4 Replies

10. Red Hat

Grub Bootloader & CentOS

I'm clueless about Grub and having issues with CentOS6.6 that is installed on the box. It also has Windows 8.1 installed. I want to reinstall CentOS to version 7, but want to insure I don't wipe anything, and the bootloader remains as is, but includes the new CentOS installation. How do I go about... (2 Replies)
Discussion started by: Nvizn
2 Replies
Bootloader::Library(3)					User Contributed Perl Documentation				    Bootloader::Library(3)

NAME
Bootloader::Library - library for accessing configuration of the bootloader PREFACE
This package is the public API to configure bootloader settings SYNOPSIS
"use Bootloader::Library;" "$obj_ref = Bootloader::Library->new ();" "$status = Bootloader::Library->SetLoaderType ($bootloader);" "$status = Bootloader::Library->DefineMountPoints (\%mountpoints);" "$status = Bootloader::Library->DefinePartitions (@partitions);" "$status = Bootloader::Library->DefineMDArrays (\%md_arrays);" "$status = Bootloader::Library->ReadSettings ();" "$status = Bootloader::Library->WriteSettings ();" "$status = Bootloader::Library->ReadSettingsTmp ($tmp_dir);" "$status = Bootloader::Library->WriteSettingsTmp ($tmp_dir);" "$files_contents_ref = Bootloader::Library->GetFilesContents ();" "$status = Bootloader::Library->SetFilesContents (\%files_contents);" "$status = Bootloader::Library->UpdateBootloader ($avoid_init);" "$status = Bootloader::Library->InitializeBootloader ();" "$file_list_ref = Bootloader::Library->ListConfigurationFiles ();" "$settings_ref = Bootloader::Library->GetSettings ();" "$status Bootloader::Library->SetSettings ($settings_ref);" "$global_ref = Bootloader::Library->GetGlobalSettings ();" "$status = Bootloader::Library->SetGlobalSettings ($global_settings_ref);" "$sections_ref = Bootloader::Library->GetSections ();" "$status = Bootloader::Library->SetSections ($sections_ref);" "$device_map_ref = Bootloader::Library->GetDeviceMapping ();" "$status = Bootloader::Library->SetDeviceMapping ($device_map_ref);" "$unix_dev = Bootloader::Library->GrubDev2UnixDev ($grub_dev);" "$result = Bootloader::Library::DetectThinkpadMBR ($disk);" "$result = Bootloader::Library::WriteThinkpadMBR ($disk);" DESCRIPTION
"$obj_ref = Bootloader::Library->new ();" Creates an instance of the Bootloader::Library class. "$status = Bootloader::Library->SetLoaderType($bootloader);" Initializes the library for the particular bootloader. Takes the name of the bootloader as parameter. Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $status = Bootloader::Library->SetLoaderType ("lilo"); if (! defined ($status)) { die "Error occurred while initalizing for LILO"; } "$status = Bootloader::Library->DefineMountPoints (\%mountpoints);" Defines mount points in the system so that the library does not need to probe them itself when needed. Parameter (mountpoints) is a hash reference (key is mountpoint, value device). Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $mp = { "/" => "/dev/hda3", "/boot" => "/dev/hda1", } Bootloader::Library->DefineMountPoints ($mp); "$status = Bootloader::Library->DefinePartitions (@partitions);" Defines the information about partitions - what disk a partition belongs to and the number of the partition Parameter (partitions) is a list, one entry per partition, each entry is a 3-item list, containing the device of the partition, the device of the disk the partition belongs to, and the number of the partition (first is 1). Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $part = [ [ "/dev/hda1", "/dev/hda", 1], [ "/dev/hda3", "/dev/hda", 3] ]; Bootloader::Library->DefinePartitions ($part); "$status = Bootloader::Library->DefineMDArrays (\%md_arrays);" This interface is broken by design and its use is deprecated!! We only need information about mirrored devices (RAID1) and only GRUB uses that hack. Defines the information about MD RAID arrays (what array is built by what disks). As parameter, it takes a reference to a map of all MD devices, where key is the MD device name, and value a reference to a list of its members. Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $md = { "/dev/md0" => ["/dev/hda1", "/dev/hdc1"], "/dev/md1" => ["/dev/hda2", "/dev/hdc2"], }; Bootloader::Library->DefineMDArrays ($md); "$status = Bootloader::Library->DefineMultipath (\%multipath);" Define hardware information about multipath device. We only need information to write to device map real device, because created multipath device doesn't have geometry and GRUB doesn't work. As parameter, it takes a reference to a map of all multipath devices, where key is the physical value (/dev/sda), and value a multipath device(/dev/mapper/...). Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $mp = { "/dev/sda" => "/dev/mapper/little_mapper", "/dev/sdb" => "/dev/mapper/little_mapper", }; Bootloader::Library->DefineMultipath ($mp); "$status = Bootloader::Library->DefineMultipath (\%multipath);" Define udev mapping of devices. We only need information for GRUB to translate udev device to kernel and then to grub device. As parameter, it takes a reference to a map of all udev names to correspond kernel names. Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $mp = { "/dev/disks/by-id/longhorribleid" => "/dev/sda", "/dev/disks/by-id/longhorribleid-part1" => "/dev/sda1", }; Bootloader::Library->DefineUdevMapping ($mp); "$status = Bootloader::Library->ReadSettings ();" Reads the settings from the system Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $status = Bootloader::Library->ReadSettings (); if (! defined ($status)) { die "Error occurred while reading the settings"; } "$status = Bootloader::Library->WriteSettings ();" Writes the settings to the system. Does not activate the bootloader or the written settings, InitializeBootloader or UpdateBootloader functions must be used for it. Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $status = Bootloader::Library->WriteSettings (); if (! defined ($status)) { die "Error occurred while writing the settings"; } "$status = Bootloader::Library->ReadSettingsTmp ($tmp_dir);" Reads the settings from the Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $status = Bootloader::Library->ReadSettingsTmp ("/tmp"); if (! defined ($status)) { die "Error occurred while reading the settings"; } "$status = Bootloader::Library->WriteSettingsTmp ($tmp_dir);" Writes the settings to temporary directory. Slashes in the filename are replaced with underscores. Returns undef on fail, defined nonzero value otherwise. EXAMPLE: my $status = Bootloader::Library->WriteSettingsTmp ("/tmp"); if (! defined ($status)) { die "Error occurred while writing the settings"; } "$files_contents_ref = Bootloader::Library->GetFilesContents ();" Gets the future contents of all bootloader configuration files. Returns undef on fail, hash where key is file name and value its contents as value on success. EXAMPLE: my $files_contents_ref = Bootloader::Library->GetFilesContents (); if (! defined ($files_contents_ref)) { die "Cannot get the contents of the configuration files" } my $lilo_conf = $files_contents_ref->{"/etc/lilo.conf"}; print "$lilo.conf contents: $lilo_conf "; "$status = Bootloader::Library->SetFilesContents (\%files_contents);" Sets the contents of all configuration files (eg. from editor) $status = Bootloader::Library->SetFilesContents (\%files_contents); "$status = Bootloader::Library->UpdateBootloader ($avoid_init);" Really updates the bootloader configuration after writing the settings. If initialization is needed to make the settings active, but not intended (because it will be done later), set $avoid_init to 1. It makes no efect eg. for GRUB, but prevents from calling /sbin/lilo in case of LILO Returns undef on fail, defined nonzero value otherwise EXAMPLE: my $status = Bootloader::Library->UpdateBootloader (0); if (! defined ($status)) { die "Connot update the bootloader configuration"; } "$status = Bootloader::Library->InitializeBootloader ();" Initializes the firmware to boot the bootloader Returns undef on fail, defined nonzero value otherwise EXAMPLE: my $status = Bootloader::Library->InitializeBootloader (); if (! defined ($status)) { die "Cannot initialize the bootloader"; } "$files_ref = Bootloader::Library->ListConfigurationFiles ();" Returns the list of the configuration files of the bootloader Returns undef on fail EXAMPLE: my $files_ref = Bootloader::Library->ListConfigurationFiles (); if (! defined ($files_ref)) { die "Cannot list configuration files"; } foreach my $fn (@{$files_ref}) { system ("cp $fn $fn.backup"); } "$sections_ref = Bootloader::Library->GetSettings ();" Returns the complete settings of the bootloader. Returns undef on fail. EXAMPLE: see eg. GetSections function definition "$status = Bootloader::Library->SetSettings ();" Returns the complete settings of the bootloader. Returns undef on fail. EXAMPLE: see eg. GetSections function definition "$sections_ref = Bootloader::Library->GetSections ();" Gets the sections of the bootloader. See section description above. TODO Returns undef on fail. EXAMPLE: my $sections_ref = Bootloader::Library->GetSections (); if (! defined ($sections_ref)) { die "Getting sections failed"; } my @sect_names = map { $_->{"name"}; } @{$sections_ref}; my $list = join ", " @sect_names; print "Sections: $list"; "$global_ref = Bootloader::Library->GetGlobalSettings ();" Gets the global settings of the bootloader. See the example map above TODO Returns undef on fail. EXAMPLE: my $global_ref = Bootloader::Library->GetGlobalSettings (); if (! defined ($global_ref)) { die "Getting global data failed"; } my $default = $global_ref->{"default"}; print "Default section: $default"; "$device_map_ref = Bootloader::Library->GetDeviceMapping ();" Gets the device mapping between Linux and firmware. Returns undef on fail. EXAMPLE: $device_map_ref = Bootloader::Library->GetDeviceMapping (); if (! defined ($device_map_ref)) { die "Getting device mapping failed"; } my $hda = $device_map_ref->{"/dev/hda"}; print "/dev/hda is $hda"; "$status = Bootloader::Library->SetSections ();" Sets the sections of the bootloader. Sections have the same format as return value of GetSections (). Returns undef on fail, defined nonzero value on success. EXAMPLE: my $sections_ref = Bootloader::Library->GetSections (); if (! defined ($sections_ref)) { die "Getting sections failed"; } my @sections = @{$sections_ref}; pop @sections; my $ret = Bootloader::Library->SetSections (@sections); if (! defined ($ret)) { print ("Setting sections failed"); } "$status = Bootloader::Library->SetGlobalSettings ();" Sets the global settings of the bootloader. The argument has the same format as the return value of GetGlobalSettings (). Returns undef on fail, defined nonzero value on success. EXAMPLE: my $global_ref = Bootloader::Library->GetGlobalSettings (); if (! defined ($global_ref)) { die "Getting global data failed"; } $global_ref->{"default"} = "linux"; my $ret = Bootloader::Library->SetGlobalSettings ($global_ref); if (! defined ($ret)) { print ("Setting global options failed."); } "$status = Bootloader::Library->SetDeviceMapping ();" Sets the device mapping between Linux device and firmware identification. Returns undef on fail, defined nonzero value on success. EXAMPLE: $device_map_ref = Bootloader::Library->GetDeviceMapping (); if (! defined ($device_map_ref)) { die "Getting device mapping failed"; } $device_map_ref->{"/dev/hda"} = "(hd0)"; my $ret = Bootloader::Library->SetDeviceMapping ($device_map_ref); if (! defined ($ret)) { print ("Setting global options failed."); } "$unix_dev = Bootloader::Core::GRUB->GrubDev2UnixDev ($grub_dev);" Translates the GRUB device (eg. '(hd0,0)') to UNIX device (eg. '/dev/hda1'). As argument takes the GRUB device, returns the UNIX device (both strings). Wrapper function to be able to use this grub function in Tools.pm. "($dev,$path) = Bootloader::Library->SplitPath ($path);" Split unix path to device and relative path on this device. "$result = Bootloader::Library::DetectThinkpadMBR ($disk);" Try detect on disk if contains ThinkpadMBR. Return true if detected. "$result = Bootloader::Library::WriteThinkpadMBR ($disk);" Write generic mbr to disk on thinkpad. Return undef if fail. "$result = Bootloader::Library::ExamineMBR ($disk);" Detects what code is in MBR of device. Return string or undef if fail. Possible string is: generic -> generic MBR grub -> Grub MBR lilo -> lilo stage1 windows -> windows vista -> windows vista (has another mbr) thinkpad -> thinkpad custom mbr unknown -> unknown code invalid -> code which cannot boot perl v5.12.1 2010-05-25 Bootloader::Library(3)
All times are GMT -4. The time now is 12:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy