LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 09:25 PM   #1
jago25_98
Member
 
Registered: Jun 2001
Posts: 302

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 08:08 AM. Reason: solved
 
Old 05-04-2011, 09:36 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
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



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 03:52 PM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM
Bluewhite64 13.0 LiveDVD tpreitzel Bluewhite64 0 11-23-2009 07:42 PM
LiveDVD will not run zanad00 Linux - Newbie 6 03-25-2007 06:09 PM
A LiveDVD of LiveCDs? scuffell Linux - Distributions 0 08-29-2004 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:41 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
Open Source Consulting | Domain Registration