LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-10-2020, 03:26 PM   #1
ASF84
LQ Newbie
 
Registered: Apr 2020
Posts: 8

Rep: Reputation: Disabled
After installing Ubuntu on a Mass storage device I can't use RedHat. Error: No such device <hex number>


Hello.

So my computer has RedHat and I used a pendrive to instal ubuntu on a Mass Storage device to have a portable OS in case I need it.

The issue is that after installing Ubuntu on the external hard drive, when I unplug it, all I get is this error message:

Error: No such device <hex number>
grub rescue>

I tried to follow some youtube videos with not much of a success.

When I type:

grub rescue> ls
(hd0) (hd0,2) (hd0,1)
with any option I always get:
error: unknown filesystem.

If I type:
grub rescue> set
prefix=(hd0,1)/boot/grub
root=hd0,1

Also if I type:
grub rescue> set boot=(hd0,1)
grub rescue> set prefix=(hd0,1)/boot/grub
grub rescue> insmod normal
grub rescue> normal
I get:
error: unknown filesystem.

So I haven't been able to get near a solution.

I tried to follow the thread
"[SOLVED] Error: No such device <hex number>, Grub Rescue>"
from this forum, but I'm not really that good with Linux, so I can't really follow the thread (I guess I'm not the sharpest tool in the shed).

It is worth mentioning that I do not have a redhat install pendrive or anything, nor do I have now the option of getting one.

As a note: When the Hard drive is connected it will open Ubuntu, but will not let me open RedHat, and when it's not plugged it just will jump to the error.

I hope someone here is patient enough to help me.

Thanks in advance.
 
Old 04-10-2020, 06:50 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I suppose you actually mean Red Hat Enterprise Linux (RHEL) when you say "Red Hat". Tell us which version you installed on this computer.

Quote:
Originally Posted by ASF84 View Post
It is worth mentioning that I do not have a redhat install pendrive or anything, nor do I have now the option of getting one.
Of course you do. Launch Ubuntu and get a RHEL or Centos installation ISO file.

After launching Ubuntu, you can also check what is on your internal disk. Start by running lsblk and blkid to list your storage devices and pasting the output here.

There are chances you just overwrote the RHEL boot partition. It's not too hard to recreate it. Alternatively, you should be able to recover the data from the internal disk, reinstall RHEL and copy the data back.

Last edited by berndbausch; 04-10-2020 at 06:53 PM.
 
Old 04-10-2020, 07:13 PM   #3
ASF84
LQ Newbie
 
Registered: Apr 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hello,

Correct it's RHEL 7 if I'm not mistaken.

The other problem is that when I use the Ubuntu I can't connect to Internet. It is Ubuntu 10.04 that I had on an old USB and my plan was to install it, since it was the only one I had, and then Update it to a never version.

Ok, thanks a lot, I'll try solving the connection issue and then following your steps, and I'll let you know.

All the information should remain there shouldn't it? The should not be any loss of data?
 
Old 04-10-2020, 08:11 PM   #4
ASF84
LQ Newbie
 
Registered: Apr 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
Ok.

I tried to run Ubuntu, but now it won't, it will just send me to the grub rescue.

If I try to use F12 to select the OS it doesn't appear. And if I run Ubuntu using the pendrive, then if I go to terminal and try lsblk and blkid I get:

lsblk
No command 'lsblk' found, did you mean 'lslk' (universe)

So I tried lslk and I get

The program 'lslk' is currently not installed.

And if I try blkid nothing happens

I also tried them like sudo lsblk and sudo blkid.
 
Old 04-10-2020, 08:27 PM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The commands I gave you only list information, they don't change anything. However, obviously you will eventually have to change something to repair your system.

Ubuntu 10 is over ten years old and might not have the tools that I am familiar with. Since blkid and lsblk don't reveal anything, do you get something out of this command?
Code:
$ sudo ls /sys/block
The best way to get your system back, without having to follow some guy on the internet (me) who asks you to type arcane commands without seeing their output, is by booting from a RHEL 7 installation medium, DVD or USB drive. Gain access to the internet from the pendrive, or from some other device, download the RHEL 7 or Centos 7 ISO and copy it to a different drive. Boot from it and select the rescue option. It should have an option for reinstalling the boot partition.

First step to get internet access: Tell us the output of
Code:
$ ip address
$ ifconfig       (if ip address doesn't work)
$ cat /etc/network/interfaces
EDIT: Also try installing Ubuntu on the external drive again. It's much easier to use a full installation rather than live media for troubleshooting.

Last edited by berndbausch; 04-10-2020 at 08:32 PM.
 
Old 04-10-2020, 08:43 PM   #6
ASF84
LQ Newbie
 
Registered: Apr 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
Ok, thanks.

Will work on this and let you know.
 
Old 04-10-2020, 09:14 PM   #7
ASF84
LQ Newbie
 
Registered: Apr 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
It says:

sudo ls /sys/block
loop0 loop3 loop6 ram1 ram12 ram15 ram4 ram7 sda
loop1 loop4 loop7 ram10 ram13 ram2 ram5 ram8 sdb
loop2 loop5 ram0 ram11 ram14 ram3 ram6 ram9

ubuntu@ubuntu:-$ ip address
l: lo: <LOOPBACK, UP, LOWER UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6::1/128 scope host
valid_lft forever preferred_lft forever
2: pane: <BROADCAST, MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether 22:01:02:38:6a:59 brd ff:ff:ff:ff:ff:ff
ubuntu@ubuntu:-$ ifconfig
lo Link encap:Local Loopback
inet addr: 127.0.0.1 Mask:255.0.0.0
inet6 addr: :1/128 Scope:Host
UP LOOPBACK RUNNING MTU: 16436 Metric:1
RX packets:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3072 (3.0 KB) TX bytes:3072 (3.0 KB)

ubuntu@ubuntu:-$ cat /ect/network/interfaces
cat: /ect/network/interfaces: No such file or directory
ubuntu@ubuntu:
 
Old 04-10-2020, 10:02 PM   #8
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by ASF84 View Post
It says:

sudo ls /sys/block
loop0 loop3 loop6 ram1 ram12 ram15 ram4 ram7 sda
loop1 loop4 loop7 ram10 ram13 ram2 ram5 ram8 sdb
loop2 loop5 ram0 ram11 ram14 ram3 ram6 ram9
This means that two SCSI disks sda and sdb are recognized, but not any partitions on those disks, which would be named sda1, sda2 etc.

There are two possibilities: The partition tables on those disks have been wiped out, or they have GPT partition tables (all modern PCs use GPT these days) and Ubuntu 10 is too old to see them. I lean towards the latter.

Quote:
ubuntu@ubuntu:-$ ip address
l: lo: <LOOPBACK, UP, LOWER UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6::1/128 scope host
valid_lft forever preferred_lft forever
2: pane: <BROADCAST, MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether 22:01:02:38:6a:59 brd ff:ff:ff:ff:ff:ff
It doesn't recognize any network interface. "lo" is not a physical interface (it's a kernel structure that refers to the system itself), and I have no idea what "pane" is. ifconfig doesn't even see this pane, and an OUI lookup of 22:01:02 doesn't result in anything.

Quote:
ubuntu@ubuntu:-$ cat /ect/network/interfaces
cat: /ect/network/interfaces: No such file or directory
You mistyped that. Try "etc" instead of "ect".

I have the feeling that Ubuntu 10 is unable to deal with your PC. It doesn't seem to see GPT partitions and doesn't recognize network interfaces. Can you also run lspci, please?

And this command:
Quote:
dmesg | grep sd[ab]
to see if the kernel messages have anything to say about the disks.

Last edited by berndbausch; 04-10-2020 at 10:04 PM.
 
Old 04-10-2020, 10:17 PM   #9
ASF84
LQ Newbie
 
Registered: Apr 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
Yes it seems very likely. I've had it for some year now.

Ok with etc says the same:
ubuntu@ubuntu:-$ cat /etc/network/interfaces
cat: /ect/network/interfaces: No such file or directory


And:

ubuntu@ubuntu:-s dmesg| grep sd[ab]

3.019361] sd 4:0:0:0: [sdal 976773168 512-byte logical blocks: (500 GB/465
GiB)

3.019363) sd 4:0:0:0 [sdal 4096-byte physical blocks

3.019387] sd 4:0:0:0: [sdal Write Protect is off
3.019389] sd 4:0:0:0: [sda] Mode Sense: 00 3a 00 00
3.019402] sd 4:0:0:0: [sda] Write cache: enabled, read cache: enabled, does

support DPO or FUA

3.0194731 sda: sdal sda2
3.0512571 sd 4:0:0:0: [sda] Attached scSI disk
3.407259 EXT4-fs (sdal): mounted filesystem with ordered data mode
8.245942] sd 6:0:0:0: [sdb] 3973120 512-byte logical blocks: (2.03 GB/1.89

GiB)

8.246518] sd 6:0:0:0: [sdb] Write Protect is off
8.246520] sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00
8.246521] sd 6:0:0:0: [sdb] Assuming drive cache: write through
8.248693] sd 6:0:0:0: [sdb] Assuming drive cache: write through
8.248705] sdb: Ssdbl
8.250623] sd 6:0:0:0: [sdb] Assuming drive cache: write through
8.250626] sd 6:0:0:0: [sdb]1 Attached scSI removable disk

ubuntu@ubuntu:-



I'm going to see if a friend can download RHEL 7 in a USB for me, and bring it. Although probably not going to get it today.
 
Old 04-10-2020, 10:39 PM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
This is confusing. On one hand, there is no sda1 or sda2 under /sys/block. On the other:
Code:
 3.407259 EXT4-fs (sdal): mounted filesystem with ordered data mode
...
 8.250626] sd 6:0:0:0: [sdb]1 Attached scSI removable disk
Can you also look at the mounted filesystems? Use the df command.
And lspci, please, to understand what network interfaces you have.
 
Old 04-10-2020, 11:12 PM   #11
ASF84
LQ Newbie
 
Registered: Apr 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
ubuntu@ubuntu:~s df
Filesystem 1K-blocks Used Available Use% Mounted on
aufs 1671112 13116 1657996 1% /
none 1666212 236 1665976 1% /dev
/dev/sdbl1 1978810 715900 12629910 37% /cdrom
/dev/loopo 688000 688000 0 100% /rofs
none 1671112 164 1670948 1% /dev/shm
tmpfs 1671112 84 1671028 1% tpm
none 1671112 80 1671032 1% /var/run
none 1671112 0 1671112 0% /var/lock
none 1671112 0 1671112 0% /lib/init/rw
ubuntu@ubuntu:~$


ubuntu@ubuntu:-$ lspci

00:00.0 Host bridge: Intel Corporation Device ec04 (rev 06)
00:02.0 VGA Compatible controller: Intel Corporation Device 0416 (rev 06)
00:03.0 Audio device: Intel Corporation Device ecec (rev 06)

00:14.0 USB Controller: Intel_ Corporation Device 8c31 (rev 05)
00:16.0 Communication controller: Intel Corporation Device 8c3a (rev 04)
00:16.3 Serial cont roller: Intel corporation Device 8c3d (rev 04)

00:19.0 Ethernet controller: Intel cCorporation Device 153a (rev 05)

00:1a.0 USB Controller: Intel corporation Device 8c2d (rev 05)

00:1b.0 Audio device: Intel Corporation Device 8c20 (rev 05)
00:1c.0 PCI bridge: Intel Corporation Device Bcl0 (rev d5)
00:1c.1 PCI bridge: Intel Corporation Device 8c12 (rev d5)
00:1c.2 PCI bridge: Intel Corporation Device 8cl4 (rev d5)
06:1c.4 PCI bridge: Intel Corporation Device 8cl18 (rev d5
00:1d.0 USB Controller: Intel Corporation Device 8c26 (rev 05)
09:1f.0 ISA bridge: Intel Corporation Device 8c4f (rev 05)

a0:1f.2 SATA controller: Intel Corporation Device 8c03 (rev 05)

00:1f.3 SMBus: Intel Corporation Device Bc22 (rev 05)

92:00.0 Network controlter Intel Corporation Device 08b2 frev bb
08:00.0 class ff0: Realtek Semiconductor coLtd Device 5227 (rev 61
ubuntu@ubuntu$
 
Old 04-11-2020, 12:53 AM   #12
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Code:
00:19.0 Ethernet controller: Intel cCorporation Device 153a (rev 05)
...
92:00.0 Network controlter Intel Corporation Device 08b2 frev bb
The first one is a wired network interface that is not supported in Ubuntu 10 out of the box.

The second is a wireless network adapter. I suppose its support status is similar.

I am surprised to see this in the kernel messages:
Code:
3.407259 EXT4-fs (sdal): mounted filesystem with ordered data mode
but no trace of sda1 in the list of mounted filesystems.
Code:
df
Filesystem 1K-blocks Used Available Use% Mounted on
aufs 1671112 13116 1657996 1% /
none 1666212 236 1665976 1% /dev
/dev/sdbl1 1978810 715900 12629910 37% /cdrom
/dev/loopo 688000 688000 0 100% /rofs
none 1671112 164 1670948 1% /dev/shm
tmpfs 1671112 84 1671028 1% tpm
none 1671112 80 1671032 1% /var/run
none 1671112 0 1671112 0% /var/lock
none 1671112 0 1671112 0% /lib/init/rw
sdb is obviously the CDROM.

If I had the system in front of me, I would probably poke around a little more, but given all these obstacles and oddities I think it's better to wait for the Centos/RHEL ISO media. I don't feel confident I can solve this from remote.
 
Old 04-11-2020, 01:29 AM   #13
ASF84
LQ Newbie
 
Registered: Apr 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
No problem.

I appreciate your efforts and help.

Probably by monday I'll have a copy of it. I'll let you know.

But seriusly, thanks a lot...
 
  


Reply



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
[bash] ASCII to HEX and hex to ascii ////// Programming 17 05-08-2018 09:55 PM
convert number (not hex) into Decimal number drManhattan Programming 10 10-15-2011 08:53 PM
[SOLVED] Error: No such device <hex number>, Grub Rescue> Aquarius_Girl Linux - Newbie 60 10-22-2010 12:04 AM
Hex output of a hex/ascii input string mlewis Programming 35 04-10-2008 12:05 PM
hex to ascii and ascii to hex ilnli Programming 7 08-31-2007 11:55 AM

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

All times are GMT -5. The time now is 10:47 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