LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 05-04-2011, 10:25 PM   #1
jago25_98
Member
 
Registered: Jun 2001
Posts: 280

Rep: Reputation: 30
[solved] Grub2 rewrite from liveDVD


Made a mistake with /etc/default/grub
...
now nothing will boot.

So I need to edit that file and update-grub.

But if I chroot to the / from a liveCD I get
"/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?)."

How do I change grub if I can't get to it (set the menu to 0 by mistake)

Last edited by jago25_98; 05-26-2011 at 09:08 AM. Reason: solved
 
Old 05-04-2011, 10:36 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Use this to chroot.

Make sure that you replace /dev/sdXy with the correct disk and partition

Code:
#! /bin/bash
sudo mount /dev/sdXy /mnt/
sudo mount --bind /proc /mnt/proc
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /sys /mnt/sys
chroot /mnt/ /bin/bash

sudo umount /mnt/sys
sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/
 
  


Reply

Tags
boot, grub, grub2, livecd


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SlackEX LiveDVD someone ? NoStressHQ Slackware 2 02-22-2011 04:52 PM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 03:39 PM
Bluewhite64 13.0 LiveDVD tpreitzel Bluewhite64 0 11-23-2009 08:42 PM
LiveDVD will not run zanad00 Linux - Newbie 6 03-25-2007 07:09 PM
A LiveDVD of LiveCDs? scuffell Linux - Distributions 0 08-29-2004 04:22 PM


All times are GMT -5. The time now is 09:06 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration