Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › adding entrys to grub -Debian
New Posts  All Forums:Forum Nav:

adding entrys to grub -Debian

post #1 of 9
Thread Starter 
this may seem like a dumb question, but I can't find a good online answer to this. what is the best way to add an entry to grub (in debian) basically, switched over to my debian install, did a dist upgrade and when updating grub it removed the entries for my arch install. I found the file where the menu is listed, but it says you should not edit it, and instead points me to another file in which I have no idea what to do
Viracocha
(12 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSPowerCase
Fedora Linux 19 (F19) 64-bit LPS Ultra 550 watt Thermaltake V4  
  hide details  
Reply
Viracocha
(12 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSPowerCase
Fedora Linux 19 (F19) 64-bit LPS Ultra 550 watt Thermaltake V4  
  hide details  
Reply
post #2 of 9
You'd be better off just doing a grub-mkconfig -o /boot/grub/grub.cfg so that it adds Arch back. ( if it doesn't then you may need os-prober, though normally you don't with other Linux distro's ).

/etc/grub.d/40_custom is the file to add custom entries too manually though ( at least in arch ).
Edited by Shrak - 10/25/12 at 7:11pm
post #3 of 9
Meh
(14 items)
 
   
CPUMotherboardGraphicsRAM
i5 760 @ 3.8 Ghz GA-P55-USB3 Gigabyte GTX 460 16GB(4x4) Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Samsung Spinpoint F3 1TB Asus Cheapo Corsair H70 Arch Linux 
MonitorKeyboardPowerCase
LG 26LH20 HDTV Das Model S Ultimate Silent Corsair HX850 Lian Li(Lancool) PC-K62 
MouseMouse Pad
Logitech MX 518 My desk. 
CPUMotherboardGraphicsRAM
Intel Core i5-4200U Toshiba Intel HD Graphics 4400 6 GB DDR3L @1600 Mhz 
Hard DriveOptical DriveCoolingOS
750 GB 5400RPM SATA HDD DVD SuperMulti drive Stock fans Arch Linux 
MonitorKeyboardPowerCase
15.6" 1920x1080 Screen Toshiba Toshiba battery and A/C adapter Toshiba 
MouseAudio
Touchpad Intel HD Audio 
  hide details  
Reply
Meh
(14 items)
 
   
CPUMotherboardGraphicsRAM
i5 760 @ 3.8 Ghz GA-P55-USB3 Gigabyte GTX 460 16GB(4x4) Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Samsung Spinpoint F3 1TB Asus Cheapo Corsair H70 Arch Linux 
MonitorKeyboardPowerCase
LG 26LH20 HDTV Das Model S Ultimate Silent Corsair HX850 Lian Li(Lancool) PC-K62 
MouseMouse Pad
Logitech MX 518 My desk. 
CPUMotherboardGraphicsRAM
Intel Core i5-4200U Toshiba Intel HD Graphics 4400 6 GB DDR3L @1600 Mhz 
Hard DriveOptical DriveCoolingOS
750 GB 5400RPM SATA HDD DVD SuperMulti drive Stock fans Arch Linux 
MonitorKeyboardPowerCase
15.6" 1920x1080 Screen Toshiba Toshiba battery and A/C adapter Toshiba 
MouseAudio
Touchpad Intel HD Audio 
  hide details  
Reply
post #4 of 9
Thread Starter 
Quote:
Originally Posted by Shrak View Post

You'd be better off just doing a grub-mkconfig -o /boot/grub/grub.cfg so that it adds Arch back. ( if it doesn't then you may need os-prober, though normally you don't with other Linux distro's ).

/etc/grub.d/40_custom is the file to add custom entries too manually though ( at least in arch ).

isn't working for me even with os-prober. reinstalled grub and when I ran it again it said it found arch but its still not in the boot menu, the this very odd entry: Debian GNU/Linux with linux linux (/dev/sda4) (sda4 is my arch partition) just boots deian. some of the other entrys about /dev/sda4 fail to boot at all. however, arch is still there as I can chroot into it

Quote:
Originally Posted by Metmop View Post

http://wiki.debian.org/Grub#Configuring_Grub

seen that, doesn't help me much as I need how to configure the files rather then what files to configure
Viracocha
(12 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSPowerCase
Fedora Linux 19 (F19) 64-bit LPS Ultra 550 watt Thermaltake V4  
  hide details  
Reply
Viracocha
(12 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSPowerCase
Fedora Linux 19 (F19) 64-bit LPS Ultra 550 watt Thermaltake V4  
  hide details  
Reply
post #5 of 9
Odd. This is just me but I'd just chroot the Arch install and run grub-install and grub-mkconfig from there and leave Arch to handle the grub menu's since that I know for a fact works regardless.

But as you know I also don't use Debian much so it could be a very debian specific problem, i don't know. Not a big fan of messing with boot loaders much.
post #6 of 9
Thread Starter 
Quote:
Originally Posted by Shrak View Post

Odd. This is just me but I'd just chroot the Arch install and run grub-install and grub-mkconfig from there and leave Arch to handle the grub menu's since that I know for a fact works regardless.

But as you know I also don't use Debian much so it could be a very debian specific problem, i don't know. Not a big fan of messing with boot loaders much.

one thing that has bugged me about debian is that everything is so 'secure' sometimes you have to jump though hoops to get it to do what you want. anyway, I did this on my server a while back but forget how. I need to mount /proc and /tmp in my chroot or else any non basic thing I do is met with errors, ie pacman can't find certs. any help?
Viracocha
(12 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSPowerCase
Fedora Linux 19 (F19) 64-bit LPS Ultra 550 watt Thermaltake V4  
  hide details  
Reply
Viracocha
(12 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSPowerCase
Fedora Linux 19 (F19) 64-bit LPS Ultra 550 watt Thermaltake V4  
  hide details  
Reply
post #7 of 9
# mkdir /mnt/arch
# mount /dev/sda3 /mnt/arch
# mount /dev/sda1 /mnt/arch/boot/
# mount /dev/sdb5 /mnt/arch/home/
# mount ...
# cd /mnt/arch
# mount -t proc proc proc/
# mount -t sysfs sys sys/
# mount -o bind /dev dev/
# mount -t devpts pts dev/pts/
# chroot . /bin/bash

https://wiki.archlinux.org/index.php/Change_Root

tongue.gif Gotta love the wiki (ofc replace the drive numbers/letters with your own)
post #8 of 9
Thread Starter 
ok so we have good news and bad news.

good news: I can now boot into arch
bad news: when I start my computer it says something to the likes of 'can not out put to this display' so I a. have no idea weather arch is seeing debian b. am %100 blind in grub. looking on the wiki now for a solution
Viracocha
(12 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSPowerCase
Fedora Linux 19 (F19) 64-bit LPS Ultra 550 watt Thermaltake V4  
  hide details  
Reply
Viracocha
(12 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 B55 Biostar A880GZ  AMD Radeon HD 4250 iGPU 8GB (2x4GB) Patriot Sector 5 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
Seagate Barracuda 1TB (ST1000DM003) Western Digital Caviar SE 250GB Seagate External 1TB LG DVD Burner 
OSPowerCase
Fedora Linux 19 (F19) 64-bit LPS Ultra 550 watt Thermaltake V4  
  hide details  
Reply
post #9 of 9
Quote:
Originally Posted by jrl1357 View Post

this may seem like a dumb question, but I can't find a good online answer to this. what is the best way to add an entry to grub (in debian) basically, switched over to my debian install, did a dist upgrade and when updating grub it removed the entries for my arch install. I found the file where the menu is listed, but it says you should not edit it, and instead points me to another file in which I have no idea what to do

Quote:
Originally Posted by Shrak View Post

/etc/grub.d/40_custom is the file to add custom entries too manually though ( at least in arch ).

put something like this in 40_custom
Code:
#!/bin/sh -e
echo "Adding Arch Linux to GRUB 2"
cat << EOF
menuentry "Arch Linux" {
set root=(hd0,4)
linux /boot/vmlinuz
initrd /boot/initrd
}
EOF

echo "Adding Arch Linux to GRUB 2" just displays during update-grub. change it to what ever you want

menuentry "Arch Linux" is what will show in the grub menu

set root=(hd0,4) means device 1 partition 4
It's a little different in grub2 device numbers start at 0 and partitions start at 1
I believe you said sda4 is your arch install so that would be hd,0,4

And of course adjust /boot/vmlinuz and /boot/initrd to what ever is in your arch boot directory

Make the script executable

And last but not least run update-grub as root

Also if you change the number in 40_custom to a lower number it will appear higher in the boot order .
So if debian is 20 make this 15 and it will be before debian. You can even change the rest of the name to
anything you want
Code:
15_ARCH_Install

just use "_" for a space
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › adding entrys to grub -Debian