LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2020, 11:35 PM   #16
larstrier
Member
 
Registered: Dec 2019
Distribution: Debian
Posts: 46

Original Poster
Rep: Reputation: 18

Quote:
Originally Posted by colorpurple21859 View Post
copy the /boot/grub/grub.cfg from debian over to the usb boot/grub.
edit the first debian menu entry and change uuids to match the uuid of /dev/sdb2 and kernel versions numbers of the kernels in the usb /boot.
Boot the usb and run update-grub
I have done the following:
Code:
mount /dev/sdg1 /mnt
grub-install --boot-directory=/mnt/boot /dev/sdg
cp /boot/grub/grub.cfg /mnt/boot/grub/
gedit /mnt/boot/grub/grub.cfg
On gedit I used the 'find/replace' function to change the of UUID in grub.cfg to the new UUID of sdg1.

I'm guessing I now need to change the kernel number (3.16.0-11-amd64) in grub.cfg to the new kernel number of sdg1.
Where can I find the new kernel number?
 
Old 07-09-2020, 11:50 PM   #17
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,495

Rep: Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801
in /mnt/boot or change the linux line from /boot/vmlinuz-<version?> to /vmlinuz and the initrd line to /initrd.img
 
Old 07-10-2020, 12:15 AM   #18
larstrier
Member
 
Registered: Dec 2019
Distribution: Debian
Posts: 46

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by colorpurple21859 View Post
in /mnt/boot or change the linux line from /boot/vmlinuz-<version?> to /vmlinuz and the initrd line to /initrd.img
I have more than one version of debian on disk.
grub.cfg therefore has 3 different kernel numbers. Will it be ok to change them all to the new kernel number of debian 10 (4.19.0-9-amd64)?
 
Old 07-10-2020, 12:21 AM   #19
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,495

Rep: Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801
change the grub.cfg lines to this and you won't have to bother with version numbers.
Code:
linux /vmlinuz root=UUID=<some number> ro ...... splas quiet
initrd /initrd.img

Last edited by colorpurple21859; 07-10-2020 at 12:25 AM.
 
Old 07-10-2020, 02:02 AM   #20
larstrier
Member
 
Registered: Dec 2019
Distribution: Debian
Posts: 46

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by colorpurple21859 View Post
change the grub.cfg lines to this and you won't have to bother with version numbers.
Code:
linux /vmlinuz root=UUID=<some number> ro ...... splas quiet
initrd /initrd.img
There is no reference to 'splash' on /mnt/boot/grub/grub.cfg.

For the lines referring to 'vmlinuz I get this:

Code:
linux	/boot/vmlinuz-3.16.0-10-amd64 root=UUID=some number ro  quiet
linux	/boot/vmlinuz-3.16.0-10-amd64 root=UUID=some number ro single
Also there is:
Code:
linux /boot/vmlinuz-3.16.0-10-amd64 root=UUID=some number ro resume=UUID=some number quiet
linux /boot/vmlinuz-3.16.0-10-amd64 root=UUID=some number ro single resume=UUID=some number
Then there is:
Code:
'osprober-gnulinux-/boot/vmlinuz-3.16.0-10-amd64--some number'
'osprober-gnulinux-/boot/vmlinuz-3.16.0-10-amd64-root=UUID=some number ro single resume=UUID=some number'
1. What will I need to change with each line referring to 'vmlinuz'?

With initrd it is much simpler:
Code:
initrd /boot/initrd.img-3.16.0-10-amd64
This line is the same throughout grub.cfg but they have 3 different kernel numbers.
What will I need to change with 'initrd'?
 
Old 07-10-2020, 03:24 AM   #21
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,495

Rep: Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801
Your only going to edit the first debisn menu entry. I was guessing at was on the linux line. Only replace /boot/vmlinuz-3.16... with /vmlinuz and /boot/initrd.img-3.16..... with /inird.img

This is to enable booting the usb the first time. When you boot the usb a and run update-grub these edits will be replaced.
 
Old 07-10-2020, 06:26 AM   #22
larstrier
Member
 
Registered: Dec 2019
Distribution: Debian
Posts: 46

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by colorpurple21859 View Post
Your only going to edit the first debisn menu entry. I was guessing at was on the linux line. Only replace /boot/vmlinuz-3.16... with /vmlinuz and /boot/initrd.img-3.16..... with /inird.img

This is to enable booting the usb the first time. When you boot the usb a and run update-grub these edits will be replaced.
Ok, it's finally worked! Thank you very much for your time and patience!
I really couldn't have done this myself.

There is an issue though.
I ran:
Code:
apt-get update
apt-get upgrade
A number of packages were installed.

But when I ran 'update-grub' it gave an error message 'command not found'.
Do I need to install a package on this live system which installs more commands?
 
Old 07-10-2020, 06:38 AM   #23
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,495

Rep: Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801Reputation: 801
Quote:
But when I ran 'update-grub' it gave an error message 'command not found'.
This would indicate the grub package isn't installed, run as root.
Code:
apt-get install grub
update-grub
Do not run grub-install.

On a side note you don't have to install the grub-package, if you leave as is the system will still boot after kernel updates because /vmlinuz and /initrd.img are links to the newest installed kernel. You can also edit the grub.cfg manually.

Last edited by colorpurple21859; 07-10-2020 at 07:04 AM.
 
1 members found this post helpful.
  


Reply


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
LXer: Microsoft sneaks onto Android while Android sneaks onto Windows LXer Syndicated Linux News 0 03-01-2016 04:15 AM
[SOLVED] How Do I Install deDECTED onto Kali-Linux or Audacity onto BT5R2 mervselm Linux - Newbie 1 09-07-2014 06:14 PM
Installing Debian onto USB Flash Media Cotun Linux - General 2 04-04-2010 09:26 AM
Installing Debian onto external usb hard drive sublyme718 Linux - Newbie 2 02-28-2009 12:50 PM
Installing Debian 4.r4 onto USB Stick FROM boot DVD charliebrown_au Linux - Newbie 2 09-17-2008 04:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:10 PM.

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