Minimal BASH --- Grub --- error 17

Christina

Active Member
Credits
0
When I do:
grub> ls /boot/vmlinuz-4.4.0-72-generic root=/dev/sda1
It says:
vmlinuz-4.4.0-72-generic
error: file ;/dev/sda1' not found
 


Christina

Active Member
Credits
0
OK, you're close (I hope!). In the 2nd and 3rd commands, you gave "ls" which isn't correct. Check them carefully, and use that "tab completion" to help you fill them in. So...

grub> set root=(hd0,1) --- this first
grub> linux vmlinuz-4.4.0-47-generic root=/dev/sda1 ---command is linux, then a space
grub> initrd /boot/initrd.img-4.4.0-47-generic ---command is initrd, then a space
grub> boot ---then this

The article mentions another possibility if this fails, but see what happens with these commands. (Of course, don't copy my comments! LOL)
grub> linux vmlinuz-4.4.0-47-generic root=/dev/sda1
error: invalid file name 'vmlinuz-4.4.0-47-generic'

do I have to do the set root first each time I try a new version and when do I hit tab
 

atanere

Well-Known Member
Credits
0
I don't think you have to do set root each time (unless you reboot).

I may have not copied/pasted correctly too... lets try this 2nd command again... remember that the command is "linux" now, and not "ls".

grub> linux /boot/vmlinuz-4.4.0-47-generic root=/dev/sda1

So I added /boot before vmlinuz.... but you should be able to type: linux /boot/vmli (and hit TAB), then put a space, and add the root= stuff at the end.
 

atanere

Well-Known Member
Credits
0
Think we can boot from the usb here? It is still in......
No, I don't think the USB will work (easily, anyway) from the grub prompt. If you want to try USB, its better to go back to the other booting instruction to hold down the ESC key when turning on, and that should give you a choice of boot devices.
 

Christina

Active Member
Credits
0
I don't think you have to do set root each time (unless you reboot).

I may have not copied/pasted correctly too... lets try this 2nd command again... remember that the command is "linux" now, and not "ls".

grub> linux /boot/vmlinuz-4.4.0-47-generic root=/dev/sda1

So I added /boot before vmlinuz.... but you should be able to type: linux /boot/vmli (and hit TAB), then put a space, and add the root= stuff at the end.
Ok, that gives me grub>
 

atanere

Well-Known Member
Credits
0
Ok, that gives me grub>
Good! (I think!) It seems that it accepted the command. So the 3rd line is next, and the command you are giving is initrd... so like this:

initrd /boot/initrd.img-4.4.0-47-generic (and like vmlinuz, you can TAB after typing /boot/init and it should complete for you).
 

atanere

Well-Known Member
Credits
0
I think we might have it!! Ran through a whole bunch of stuff and now says to run fsck
Yes? If you went through the 4th final command, and its booting... that would be great. I think it's okay to run fsck now if its prompting you for that. Lets see if Ubuntu starts!!!
 

Christina

Active Member
Credits
0
Good! (I think!) It seems that it accepted the command. So the 3rd line is next, and the command you are giving is initrd... so like this:

initrd /boot/initrd.img-4.4.0-47-generic (and like vmlinuz, you can TAB after typing /boot/init and it should complete for you).
I am up and running!! Now let's finish fixing this :)
 

atanere

Well-Known Member
Credits
0
I am up and running!! Now let's finish fixing this :)
Great! But you aren't quite out of the woods yet... this final step could fail, but I hope not.

Open up a terminal, and give this command:

Code:
sudo update-grub
Give it your root password, and then you'll see a bunch of stuff scroll by again.

Then, one last command:

Code:
sudo grub-install /dev/sda
 

Christina

Active Member
Credits
0
Great! But you aren't quite out of the woods yet... this final step could fail, but I hope not.

Open up a terminal, and give this command:

Code:
sudo update-grub
Give it your root password, and then you'll see a bunch of stuff scroll by again.

Then, one last command:

Code:
sudo grub-install /dev/sda
Says:
Installing for i386 -pc platform.
Installation finished. No error reported
then gives a command line
 

atanere

Well-Known Member
Credits
0
What? You think I'm a miracle worker?!?!? :p:D:D:D

I very glad it booted... that's great! But I'm still concerned about some of the stuff going on with it, like if you are frequently needing to run fsck. And if you are able to boot on a USB or not... and even the DVD drive too. I do think you should make backups often for things that are really important, just in case it decides to quit for good.
 

Christina

Active Member
Credits
0
What? You think I'm a miracle worker?!?!? :p:D:D:D

I very glad it booted... that's great! But I'm still concerned about some of the stuff going on with it, like if you are frequently needing to run fsck. And if you are able to boot on a USB or not... and even the DVD drive too. I do think you should make backups often for things that are really important, just in case it decides to quit for good.
I did backup important stuff. DVD drive is not working at all, won't read any disk I put in and hasn't for awhile..... I am half scared to try reaching bios again lol but can put the usb in and it reads it. Should I try a live boot while I have this up? Like I said, computer is about 7 yrs old or so and hard drive is a little older lol AND it is on 24/7 even though it is a laptop because my husband is computer illiterate and can't start it lol so I leave it on all the time for him to look at stuff on ebay
 

atanere

Well-Known Member
Credits
0
You can try to boot on the USB, but I'm guessing that it won't (or else it would have earlier)

If it doesn't boot on it by itself, you can do the "hold the ESC key" thing and see if the USB shows up in that boot menu, and boot on it like that if it shows up. If you want to always be able to boot on USB, you'll have to make a change in the BIOS to put the USB 1st in the boot order. I'm sure the setting is in there, but might take a bit to find and set it and save it.
 

Christina

Active Member
Credits
0
You can try to boot on the USB, but I'm guessing that it won't (or else it would have earlier)

If it doesn't boot on it by itself, you can do the "hold the ESC key" thing and see if the USB shows up in that boot menu, and boot on it like that if it shows up. If you want to always be able to boot on USB, you'll have to make a change in the BIOS to put the USB 1st in the boot order. I'm sure the setting is in there, but might take a bit to find and set it and save it.
It recognizes the usb and shows Ubuntu-16.04.2-desktop-amd64.iso

I don't know exactly what to do now
 



Top