LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-01-2014, 02:14 AM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,735

Rep: Reputation: 256Reputation: 256Reputation: 256
Installing Grub2 like the Debian Installer?


Hello,

I have got a Linux that has a old Linux Debian on it and Windows.

So under Linux (live), I did use grub-pc and it shows a dialog that asks:

/dev/sda
sda1
/dev/sdb
sdb1

So I gave sda and after reboot grub was there but it missed files.


So I absolutely do not understand since grub reported no error all went fine.

So I decided to test debian network install iso and installed debian over it (format,...).
The menu of debian-installer did fine and went I boot the pc, it works. grub2 shows at boot!


so whats different? why grub-pc did not work and where is the booter?
on my sda or sdb?
Did debian-installer touch the sdb since it looks like it is the first booted disk...?

I join you my new config working.

Thanks in advance and hoping you may give further help !!

all the best


Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root blabla
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos2)'
  search --no-floppy --fs-uuid --set=root blabla
  set locale_dir=($root)/boot/grub/locale
  set lang=fr_FR
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, avec Linux 3.2.0-4-686-pae' --class debian --class gnu-linux --class gnu --class os {
	load_video
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos2)'
	search --no-floppy --fs-uuid --set=root blabla
	echo	'Chargement de Linux 3.2.0-4-686-pae ...'
	linux	/boot/vmlinuz-3.2.0-4-686-pae root=UUID=blabla ro  quiet
	echo	'Chargement du disque mémoire initial ...'
	initrd	/boot/initrd.img-3.2.0-4-686-pae
}
menuentry 'Debian GNU/Linux, avec Linux 3.2.0-4-686-pae (mode de dépannage)' --class debian --class gnu-linux --class gnu --class os {
	load_video
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos2)'
	search --no-floppy --fs-uuid --set=root blabla
	echo	'Chargement de Linux 3.2.0-4-686-pae ...'
	linux	/boot/vmlinuz-3.2.0-4-686-pae root=UUID=blabla ro single 
	echo	'Chargement du disque mémoire initial ...'
	initrd	/boot/initrd.img-3.2.0-4-686-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
##menuentry "Windows Vista (loader) (on /dev/sdb1)" --class windows --class os {
##	insmod part_msdos
##	insmod ntfs
##	set root='(hd1,msdos1)'
##	search --no-floppy --fs-uuid --set=root blabla
##	chainloader +1
##}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
 
Old 01-03-2014, 05:56 PM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
Hi

Quote:
where is the booter?
Actually there are 2 questions here.
Where is grub installed that is, to a MBR or PBR and secondly where are my booting files
----well we know from your grub.cfg that your booting files are translated from this line
set root='(hd0,msdos2)'

which translates as first detected drive, second partition
also known as /dev/sda2

which differs from your grub detection claiming it can only see sda1!

b) Linux kernels count hard drives from sda sdb etc
so ideally your grub is installed into MBR of sda-----as that is what you told it to go to

2) Can you boot into this Linux and open a terminal and do this pls

Code:
sudo su
apt-get update
apt-get install os-prober
update-grub
dpkg -l | grep os-prober
the last bit is to check its version number, I am on debian unstable so your version will likely be lower than mine
Code:
dpkg -l | grep os-prober
ii  os-prober                               1.63                           i386         utility to detect other OSes on a set of drives

##################

I know I should not look at your post count but why did you choose an old linux?

is this an old computer and did you check to see if it could handle a PAE kernel?
http://en.wikipedia.org/wiki/Physical_Address_Extension

A PAE-enabled Linux kernel requires that the CPU also support PAE------deduction also the motherboard

Obviously if you can boot it, it works and you can confirm with

Code:
cat /proc/cpuinfo | grep pae
Is Vista on /dev/sdb1?

Last edited by aus9; 01-03-2014 at 06:06 PM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting slackware installer via grub2 jordanwb Slackware 3 08-31-2010 03:39 PM
Installing Etch from Debian installer Raffles666 Debian 10 08-28-2010 06:55 PM
Creating the ultimate Grub2 setup: Windows installer + Live, Linux installer + live + todda7 Linux - General 47 08-05-2010 11:22 AM
How to control installing Debian on net-installer satimis Debian 3 12-22-2003 03:55 PM
RedHat installer...installing Debian! hw-tph Debian 4 10-31-2003 01:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:24 PM.

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
Open Source Consulting | Domain Registration