grub2 error disk hd0,msdos1 not found
I have googled a lot for this problem.
I found this,
but it didn't solve my problem.
Other solutions suggest me to reinstall grub (run grub-install), which didn't help neither.
Here is what I am doing: (my grub version is 2.02)
- I use grub2-mkrescue to make my X.iso
- I boot a VMWareWorkstation virtual machine, which has a 1.0GB SATA disk, from X.iso
- I install X.iso on disk, the details are:
3.1. erase /dev/sda in case there are old partitions on it:
dd if=/dev/zero of=/dev/sda bs=1M count=1
3.2. Create 3 primary partitions on /dev/sda as dev/sda1,sda2,sda3 (the size is 100M, 30M and 70M),
and toggle sda1 to be bootable
Disk /dev/sda: 1024 MB, 1073741824 bytes, 2097152 sectors
130 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sda1 * 0,1,1 12,191,50 63 204862 204800 100M 83 Linux
/dev/sda2 12,191,51 16,147,2 204863 266302 61440 30.0M 83 Linux
/dev/sda3 16,147,3 25,127,37 266303 409662 143360 70.0M 83 Linux
3.3. Format the 3 partitions as ext2, and mount /dev/sda1
mkfs.ext2 /dev/sda1
mkfs.ext2 /dev/sda2
mkfs.ext2 /dev/sda3
ROOTFS_PATH=/var/.rootfs
mkdir $ROOTFS_PATH
mount /dev/sda1 $ROOTFS_PATH
3.4 copy files...
for i in bzImage initrd.img vmlinuz-*; do
cp -rf /boot/$i $ROOTFS_PATH/boot
done
cp -f /boot/grub/device.map $ROOTFS_PATH/boot/grub/device.map
for i in init linuxrc; do
cp -rf /$i $ROOTFS_PATH
done
for i in bin etc lib sbin share usr; do
cp -a /$i $ROOTFS_PATH
done
for i in dev var proc sys tmp data log; do
mkdir -p $ROOTFS_PATH/$i
done
3.5 Install grub and make grub config file
chroot $ROOTFS_PATH <<EOF
mount -a
mdev -s
grub-install $tdisk
grub-install --recheck $tdisk
grub-mkconfig -o /boot/grub/grub.cfg
exit
EOF
- reboot
It says:
.
error: disk 'hd0,msdos1' not found
Entering rescue mode...
grub rescue>
And the most strange thing is that ls
command shows nothing in grub-rescue cli
---- as someone says, it should show disk list.
Could anyone help me to get over this? Any suggestion may be help.
linux boot system-installation grub2 vmware-workstation
New contributor
add a comment |
I have googled a lot for this problem.
I found this,
but it didn't solve my problem.
Other solutions suggest me to reinstall grub (run grub-install), which didn't help neither.
Here is what I am doing: (my grub version is 2.02)
- I use grub2-mkrescue to make my X.iso
- I boot a VMWareWorkstation virtual machine, which has a 1.0GB SATA disk, from X.iso
- I install X.iso on disk, the details are:
3.1. erase /dev/sda in case there are old partitions on it:
dd if=/dev/zero of=/dev/sda bs=1M count=1
3.2. Create 3 primary partitions on /dev/sda as dev/sda1,sda2,sda3 (the size is 100M, 30M and 70M),
and toggle sda1 to be bootable
Disk /dev/sda: 1024 MB, 1073741824 bytes, 2097152 sectors
130 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sda1 * 0,1,1 12,191,50 63 204862 204800 100M 83 Linux
/dev/sda2 12,191,51 16,147,2 204863 266302 61440 30.0M 83 Linux
/dev/sda3 16,147,3 25,127,37 266303 409662 143360 70.0M 83 Linux
3.3. Format the 3 partitions as ext2, and mount /dev/sda1
mkfs.ext2 /dev/sda1
mkfs.ext2 /dev/sda2
mkfs.ext2 /dev/sda3
ROOTFS_PATH=/var/.rootfs
mkdir $ROOTFS_PATH
mount /dev/sda1 $ROOTFS_PATH
3.4 copy files...
for i in bzImage initrd.img vmlinuz-*; do
cp -rf /boot/$i $ROOTFS_PATH/boot
done
cp -f /boot/grub/device.map $ROOTFS_PATH/boot/grub/device.map
for i in init linuxrc; do
cp -rf /$i $ROOTFS_PATH
done
for i in bin etc lib sbin share usr; do
cp -a /$i $ROOTFS_PATH
done
for i in dev var proc sys tmp data log; do
mkdir -p $ROOTFS_PATH/$i
done
3.5 Install grub and make grub config file
chroot $ROOTFS_PATH <<EOF
mount -a
mdev -s
grub-install $tdisk
grub-install --recheck $tdisk
grub-mkconfig -o /boot/grub/grub.cfg
exit
EOF
- reboot
It says:
.
error: disk 'hd0,msdos1' not found
Entering rescue mode...
grub rescue>
And the most strange thing is that ls
command shows nothing in grub-rescue cli
---- as someone says, it should show disk list.
Could anyone help me to get over this? Any suggestion may be help.
linux boot system-installation grub2 vmware-workstation
New contributor
add a comment |
I have googled a lot for this problem.
I found this,
but it didn't solve my problem.
Other solutions suggest me to reinstall grub (run grub-install), which didn't help neither.
Here is what I am doing: (my grub version is 2.02)
- I use grub2-mkrescue to make my X.iso
- I boot a VMWareWorkstation virtual machine, which has a 1.0GB SATA disk, from X.iso
- I install X.iso on disk, the details are:
3.1. erase /dev/sda in case there are old partitions on it:
dd if=/dev/zero of=/dev/sda bs=1M count=1
3.2. Create 3 primary partitions on /dev/sda as dev/sda1,sda2,sda3 (the size is 100M, 30M and 70M),
and toggle sda1 to be bootable
Disk /dev/sda: 1024 MB, 1073741824 bytes, 2097152 sectors
130 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sda1 * 0,1,1 12,191,50 63 204862 204800 100M 83 Linux
/dev/sda2 12,191,51 16,147,2 204863 266302 61440 30.0M 83 Linux
/dev/sda3 16,147,3 25,127,37 266303 409662 143360 70.0M 83 Linux
3.3. Format the 3 partitions as ext2, and mount /dev/sda1
mkfs.ext2 /dev/sda1
mkfs.ext2 /dev/sda2
mkfs.ext2 /dev/sda3
ROOTFS_PATH=/var/.rootfs
mkdir $ROOTFS_PATH
mount /dev/sda1 $ROOTFS_PATH
3.4 copy files...
for i in bzImage initrd.img vmlinuz-*; do
cp -rf /boot/$i $ROOTFS_PATH/boot
done
cp -f /boot/grub/device.map $ROOTFS_PATH/boot/grub/device.map
for i in init linuxrc; do
cp -rf /$i $ROOTFS_PATH
done
for i in bin etc lib sbin share usr; do
cp -a /$i $ROOTFS_PATH
done
for i in dev var proc sys tmp data log; do
mkdir -p $ROOTFS_PATH/$i
done
3.5 Install grub and make grub config file
chroot $ROOTFS_PATH <<EOF
mount -a
mdev -s
grub-install $tdisk
grub-install --recheck $tdisk
grub-mkconfig -o /boot/grub/grub.cfg
exit
EOF
- reboot
It says:
.
error: disk 'hd0,msdos1' not found
Entering rescue mode...
grub rescue>
And the most strange thing is that ls
command shows nothing in grub-rescue cli
---- as someone says, it should show disk list.
Could anyone help me to get over this? Any suggestion may be help.
linux boot system-installation grub2 vmware-workstation
New contributor
I have googled a lot for this problem.
I found this,
but it didn't solve my problem.
Other solutions suggest me to reinstall grub (run grub-install), which didn't help neither.
Here is what I am doing: (my grub version is 2.02)
- I use grub2-mkrescue to make my X.iso
- I boot a VMWareWorkstation virtual machine, which has a 1.0GB SATA disk, from X.iso
- I install X.iso on disk, the details are:
3.1. erase /dev/sda in case there are old partitions on it:
dd if=/dev/zero of=/dev/sda bs=1M count=1
3.2. Create 3 primary partitions on /dev/sda as dev/sda1,sda2,sda3 (the size is 100M, 30M and 70M),
and toggle sda1 to be bootable
Disk /dev/sda: 1024 MB, 1073741824 bytes, 2097152 sectors
130 cylinders, 255 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sda1 * 0,1,1 12,191,50 63 204862 204800 100M 83 Linux
/dev/sda2 12,191,51 16,147,2 204863 266302 61440 30.0M 83 Linux
/dev/sda3 16,147,3 25,127,37 266303 409662 143360 70.0M 83 Linux
3.3. Format the 3 partitions as ext2, and mount /dev/sda1
mkfs.ext2 /dev/sda1
mkfs.ext2 /dev/sda2
mkfs.ext2 /dev/sda3
ROOTFS_PATH=/var/.rootfs
mkdir $ROOTFS_PATH
mount /dev/sda1 $ROOTFS_PATH
3.4 copy files...
for i in bzImage initrd.img vmlinuz-*; do
cp -rf /boot/$i $ROOTFS_PATH/boot
done
cp -f /boot/grub/device.map $ROOTFS_PATH/boot/grub/device.map
for i in init linuxrc; do
cp -rf /$i $ROOTFS_PATH
done
for i in bin etc lib sbin share usr; do
cp -a /$i $ROOTFS_PATH
done
for i in dev var proc sys tmp data log; do
mkdir -p $ROOTFS_PATH/$i
done
3.5 Install grub and make grub config file
chroot $ROOTFS_PATH <<EOF
mount -a
mdev -s
grub-install $tdisk
grub-install --recheck $tdisk
grub-mkconfig -o /boot/grub/grub.cfg
exit
EOF
- reboot
It says:
.
error: disk 'hd0,msdos1' not found
Entering rescue mode...
grub rescue>
And the most strange thing is that ls
command shows nothing in grub-rescue cli
---- as someone says, it should show disk list.
Could anyone help me to get over this? Any suggestion may be help.
linux boot system-installation grub2 vmware-workstation
linux boot system-installation grub2 vmware-workstation
New contributor
New contributor
New contributor
asked 4 mins ago
Hurry ZengHurry Zeng
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Hurry Zeng is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501782%2fgrub2-error-disk-hd0-msdos1-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Hurry Zeng is a new contributor. Be nice, and check out our Code of Conduct.
Hurry Zeng is a new contributor. Be nice, and check out our Code of Conduct.
Hurry Zeng is a new contributor. Be nice, and check out our Code of Conduct.
Hurry Zeng is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501782%2fgrub2-error-disk-hd0-msdos1-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown