Results 1 to 10 of 22
Hello to all.
I've been using the LinuxMint distributions since Daryna about 4+ years I guess. I have always updated to the new release every 6 months as their base ...
- 01-18-2011 #1Just Joined!
- Join Date
- Jan 2011
- Location
- Southeast Coast Australia
- Posts
- 17
Trouble with GRUB and Debian on a flash drive
Hello to all.
I've been using the LinuxMint distributions since Daryna about 4+ years I guess. I have always updated to the new release every 6 months as their base Ubuntu updates. I am currently using their LinuxMint Debian Edition.
Being on a very limited income, I collect giveaway or throwaway computers. Mix and match parts and drives. This current one is a Compaq with a P4 3.4 GHz Dual Core and 1.5 GB ram 40 GB SATA and 160 GB IDE.
My current project is a Tiny Laptop AMD 1800 single core with 1 GB ram and no hard drive. I am looking to run it from a 16 GB flash drive that will also be able to boot and run on any computer - personal computer in my pocket. This is leading me to learn more about GRUB - because it's not working yet.
I have a 2 GB flash drive as a live drive (thru unetbootin) to boot up the computer. Recognized as /sda.
The 16 GB flash drive is recognized as /sdb.
The new flash drive is separated into / (root directory) with 1 GB swap partition. GRUB is loaded onto /sdb1.
The LMDE is loaded on successfully and prompt to reboot.
On reboot of the laptop, the GRUB loads then
error: out of disk.
Entering rescue mode......
grub rescue>
Just there is where I got out of my depth. Googling just got me more confused with different versions of grub and partition designations. I know that GRUB is just looking in the wrong place. How to change that is my problem I think.
Next I attempted to boot this computer from the flash drive. Even though the boot order in cmos is usb first, the computer booted normally from the hard drive.
I opened the usb with gnome and found GRUB in boot and grub.cfg inside.
Opening grub.cfg with gedit gives: -
# 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='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set 2c1313bb-48ae-4d7c-8373-42babbdf4eb0
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set 2c1313bb-48ae-4d7c-8373-42babbdf4eb0
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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/06_mint_theme ###
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set 2c1313bb-48ae-4d7c-8373-42babbdf4eb0
insmod png
if background_image /boot/grub/linuxmint.png ; then
set color_normal=white/black
set color_highlight=white/light-gray
else
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'LinuxMint GNU/Linux, with Linux 2.6.32-5-686' --class linuxmint --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set 2c1313bb-48ae-4d7c-8373-42babbdf4eb0
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=2c1313bb-48ae-4d7c-8373-42babbdf4eb0 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry 'LinuxMint GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set 2c1313bb-48ae-4d7c-8373-42babbdf4eb0
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=2c1313bb-48ae-4d7c-8373-42babbdf4eb0 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
### 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 ###
### 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 ###
Pretty sure that something in here needs changing - I need help in figuring what.
Thanks in advance
- 01-18-2011 #2Just Joined!
- Join Date
- Jan 2011
- Location
- Southeast Coast Australia
- Posts
- 17
Thinking that this flash drive would change from /sdb to /sda when the live drive was removed I changed each command referring to /sdb to /sda.
Didn't help, still went to rescue mode
- 01-18-2011 #3
Sda will be the internal drive in most cases. The liveCD should never be sda. You should be able to determine which drive is which from the size, but if both are the same size, it can be difficult. If the USB drive you want to install to is connected before you boot the liveCD, then it will most likely be seen as sda. Are you sure which drive is being seen as sda and sdb?
- 01-18-2011 #4Just Joined!
- Join Date
- Jan 2011
- Location
- Southeast Coast Australia
- Posts
- 17
Thanks for getting back to me. Down here is GMT +10, so 8.00am local. I only just got up and have to head out soon. Anyway -
I've re-installed the system, but still problems.
I have burnt the ISO image (201101 - January release) to a dvd and booted the driveless laptop with that and installed onto the flash drive. Still won't boot from the flash drive. error out of disk.
I understood the grub how to's enough to give the command 'ls' for a list of directories and path to /boot/grub/grub.config
(fd0), (fd0, msdos1), (fd0, msdos2) 'f'lash 'd'rive 0 I guess.
No sda or any internal drive.
Just booted up from the live dvd, and then inserted flash drive. Ran GParted (as superuser).
The only device recognised is /dev/sda at 14.91 GiB Flash drive
Partitiions are:
/dev/sda1 ext4 (mount point) /media/f9......... 13.92 GiB 3.13 used 10.79 unused
/dev/sda2 linux-swap 1008.00 MiB
So I think this means that GParted is not working properly.
I've just put the flash drive and my phone into this computer (installed from iso image 201012 December release) and ran GParted.
/sda 149.05 GiB (160 GiB IDE drive)
/sdb 37.27 GiB (40 GiB SATA drive)
/sdc 14.91 GiB (16 GiB flash drive)
/sdd 1.84 GiB ( 2 GiB memory card in phone)
So all devices on both computers (plus another 2 GiB flash drive on my wife's computer) are recognised as sd's or internal drives.
Any ideas from here?
- 01-18-2011 #5
Have you tried changing grub info to fd0 ? would you be better off just using unetbootin to install the live dvd to the pen drive - which should then boot on any system supporting USB boot? ... if you want multiple distros to boot from the pen drive then this may help
... and if you want to use uuid only try here - scroll down almost to the bottom of the page
- 01-18-2011 #6
The liveDVD seems to have seen the USB drives as floppy disks during the install. That's what the fd means. The drives recognized by gparted look correct, as the 16GB drive doesn't actually have 16GB, just ~16 billion bytes, which is not the same thing. Just under 15GB is about the correct number. Since gparted on the liveDVD now sees the flash drive as sda, I would suggest reinstalling to it, doing a complete reformat and repartition.
- 01-19-2011 #7Just Joined!
- Join Date
- Jan 2011
- Location
- Southeast Coast Australia
- Posts
- 17
sgosnell,
Right now I reformatted and repartitioned and loading /sda from the live dvd. Most familiar to me but, I''m not holding my breath. Probably take around 20 mins.
Jonathan183,
I reformatted the pen drive, so I couldn't try your first suggestion. If sgosnell's suggestion doesn't work I'll go into GRUB and try changing to fd0 when the install is complete.
I used unetbootin to install the iso image to a 2 GiBit pen drive. Worked fine on another comp. However, I want a persistent install to keep my home data and software settings - bookmarks for Chromium etc. I am not sure if unetbootin can do this. I have stumbled across settings to be changed to make it persistent on other forums, so I'll try chasing that up if I have to.
I am not really interested in multiple distros. I've been very happy with LinuxMint and the change from an Ubuntu base to the Debian Base is enough of a challenge for the moment. The rolling release looks to be better suited to my needs than re-installing every 6 months.
As far as uuid goes, I understand that it is a unique identifier for each device/hard drive etc but using it would probably take another month of stumbling before I came close.
Anyway, thank you both for giving me some things to try, I'll get back to you with progress reports.
Bruce
- 01-19-2011 #8Might be a good idea to read./dev/sda1 ext4 (mount point) /media/f9......... 13.92 GiB 3.13 used 10.79 unused
/dev/sda2 linux-swap 1008.00 MiB
Link
And if unconcerned. Below is a good read for Running Debian with swap on a pendrive.
Link 2
Good Luck with it. I did this instead of what you are doing.
Rok 1
Rok 2
Good Luck with it, RokLinux Registered User # 475019
Lead,Follow, or get the heck out of the way
AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
Open CourseWare for Linux Geeks
- 01-19-2011 #9Just Joined!
- Join Date
- Jan 2011
- Location
- Southeast Coast Australia
- Posts
- 17
sgosnell,
Did as you suggested. Got me to one step above GRUB rescue and onto grub>, with all of the commands suggested by TAB. Couldn't quite figure out which one I needed, so I figured it was easy enough to get to this stage, I could reformat/partition to get back to this stage. Then I will see if someone can nurse me through that.
Jonathan183,
I tried substituting fd0 for sda which gave me the correct grub menu and went into:-
Booting 'LinuxMint GNU/Linux, with Linux 2.6.32-5-686'
error: no such device: 4280308c-fc67-4361-ad18-2bc4bb02c86c.
Loading Linux 2.6.32--5-686 ...
error: no such disk.
Loading initial ramdisk ...
error: you need to load the kernel first.
Failed to boot both default and fallback entries.
This is probably why the first line of the grub.config file says:-
Do not edit this file
Even more complex to rescue me from here so, :-
From here, I will reformat and repartition the pen drive and try finding which commands to use at the grub prompt
- 01-19-2011 #10Just Joined!
- Join Date
- Jan 2011
- Location
- Southeast Coast Australia
- Posts
- 17
Hi Rok, thanks for your input.
I checked out your links and think Rok 2 method might be easiest.
Your step:-
I press any key to continue. Next I press the "e" key to get me to edit the grub entry for booting root. I press e again on the next page. I change the root entry (hd2,0) to (hd0,0), I press enter. Then I press the letter "b" so I can boot. Antix 8.2 Final is now booting up. I press the space bar again to continue with the booting process.
I will follow this and change the root entry (sda,0) to (fd0,0)
As I said - before I saw your post I broke the last install and am waiting for another install to finish


Reply With Quote
