You are not logged in.

#1 2016-10-18 18:15:41

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Grub don't boot new system

Hi guys
I've installed new arch by the guide in wiki successfully.
I was created an EFI partition (1GB) on my hard disk (/dev/sda2 that is mounted to /boot)
Also i have installed the grub correctly according to the guide.
Also my motherboard is H81M-S2PV Gigabyte ( please check this model for having if UEFI )
but when all things installed well, after rebooting, grub shows some following message :

GRUB loading.
Welcome to GRUB! ( that is highlighted )
error: file '/boot/grub/i386-pc/normal.mod' not found.
Entering rescue mode...
grub rescue> _

and the grub was installed and configured by this commands:

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg

btw, my partition table is not GPT. is MSDos

parted /dev/sda print

shows me msdos.

any idea ?
Thanks

Last edited by jiros (2016-10-18 18:19:24)


Freedom of mind with ArchLinux

Offline

#2 2016-10-18 19:56:05

ooo
Member
Registered: 2013-04-10
Posts: 1,637

Re: Grub don't boot new system

Was /boot mounted when you run grub-install? Does grub/i386-pc/normal.mod exist in sda2?

Also as you already seem to know, it's recommended to use GPT with UEFI, unless you're sure MBR won't cause issues with your hardware.

Offline

#3 2016-10-18 21:02:53

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: Grub don't boot new system

yes i know GPT is recommended to use.
yes /boot was mounted also in /boot/grub directory is there no i386-pc directory.
someone in some pages and forums wrote that your motherboard have to set secure boot disabled and something else like that. i didn't remember what was exactly.
what is your idea about that ?
--------------------------------------------------------------------
btw. if i want to convert MBR to GPT, will all my data in partitions lost ?
if no, how can i do that ?

Last edited by jiros (2016-10-18 21:05:53)


Freedom of mind with ArchLinux

Offline

#4 2016-10-18 21:21:58

S3NTYN3L
Member
From: Blito-P3
Registered: 2015-07-29
Posts: 43

Re: Grub don't boot new system

jiros wrote:

btw. if i want to convert MBR to GPT, will all my data in partitions lost ?
if no, how can i do that ?

Yes, your data will be destroyed if you convert so BACK IT UP.


UEFI Secure boot should be disabled via your BIOS menu manually.
I mean, you can install with it enabled, but it seems like too much bother to me.

FWIW, you don't need a 1GB /boot.


Also FWIW, I find GRUB to be a PITA, I'd just go this route with a GPT/UEFI install and use systemd-boot as my bootloader:

To configure a drive as GPT that will look like:

/dev/sda
    /sda1 = /boot @ 512MB   # you should be able to get away with an even smaller /boot partition too, say, 100MB :/
    /sda2 = /swap @ 8GB     # general rule is size at double your RAM
    /sda3 = / @ remaining drive space

Do this:

# Prepare drive
    lsblk                # list your drives
    parted /dev/sda      # open parted and select desired drive
    mklabel gpt          # set drive to GPT


# Partition drive
    mkpart ESP 1MiB 513MiB             # create /boot @ 512MB
    set 1 boot on                      # set the boot flag on the above partition
    mkpart linux-swap 513MiB 8.5GiB    # create /swap @ 8GB
    mkpart ext4 8.5GiB 100%            # use remaining drive space for /

# exit parted


# Create partition filesystems
    mkfs.vfat /dev/sda1
    mkfs.ext4 /dev/sda3


# Make swap-file and turn it on
    mkswap /dev/sda2
    swapon /dev/sda2


# Mount the partitions
    mount /dev/sda3 /mnt
    mkdir -p /mnt/boot
    mount /dev/sda1 /mnt/boot

Now install Arch as desired.
When you're ready to install a bootloader during your chroot session, just go with systemd-boot by doing something like:

# Install bootloader
    bootctl --path=/boot install
    
# Set bootloader defaults
    nano /boot/loader/loader.conf
        default  arch    # default entry to be loaded
        timeout  0       # seconds to wait while you make your choice of what kernel/OS you want to boot
        editor   0       # seconds to wait to edit your kernel parameters @ boot/timeout screen

# Find PARTUUID of / partition and create a bootloader entry for it
    blkid -s PARTUUID -o value /dev/sda3 >> /boot/loader/entries/arch.conf    # finds PARTUUID of /sda3 and dumps it to an entry file
    

# Now, edit that file
nano /boot/loader/entries/arch.conf
        title    Arch Linux
        linux    /vmlinuz-linux
        initrd   /initramfs-linux.img
        options  root=PARTUUID=(output from blkid command should sit here) ... blah, blah, blah,etc,etc,etc    # this line may look different on your system

# Recreate Initramfs
    mkinitcpio -p linux


# Update the bootloader
    bootctl update

That should do it...

Last edited by S3NTYN3L (2016-10-18 21:38:04)

Offline

#5 2016-10-18 21:34:57

atomicbeef
Member
Registered: 2015-09-30
Posts: 98

Re: Grub don't boot new system

It's possible to convert an MBR disk to a GPT disk without data loss, but it doesn't work on all drives. I recommend converting the disk to GPT and then reinstalling the system. The wiki and the rest of the internet contain many instructions on how to convert disks to GPT, so I would read them before asking, (especially since you have been warned multiple times before not to be a help vampire) otherwise this thread may get closed.

Offline

#6 2016-10-18 22:43:28

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: Grub don't boot new system

Thanks for answers
Anyway, my problem didn't solve and I have to use bios instead of
I got another question, my arch installation is 64 bit and when I want to install grub, the command uses target=i386-pc but my installation is 64 bit. Is there no problem ?
I figure out that 386 is for 32 bit system,is not ?


Freedom of mind with ArchLinux

Offline

#7 2016-10-18 23:14:00

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Grub don't boot new system

jiros wrote:

I got another question, my arch installation is 64 bit and when I want to install grub, the command uses target=i386-pc but my installation is 64 bit. Is there no problem ?
I figure out that 386 is for 32 bit system,is not ?

Even if you do not believe GRUB#BIOS_systems

$ grub-install --help
....
--target=TARGET        install GRUB for TARGET platform
                             [default=x86_64-efi]; available targets: arm-efi,
                             arm-uboot, arm64-efi, i386-coreboot, i386-efi,
                             i386-ieee1275, i386-multiboot, i386-pc,
                             i386-qemu, i386-xen, ia64-efi, mips-arc,
                             mips-qemu_mips, mipsel-arc, mipsel-loongson,
                             mipsel-qemu_mips, powerpc-ieee1275,
                             sparc64-ieee1275, x86_64-efi, x86_64-xen

Did not the list of available options suggest to you that you are mistaken?
What research did you do on this?

Offline

#8 2016-10-18 23:37:52

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: Grub don't boot new system

So I want to install x86_64 for bios no efi, which option have to chosen ?


Freedom of mind with ArchLinux

Offline

#9 2016-10-19 00:42:04

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Grub don't boot new system

jiros wrote:

So I want to install x86_64 for bios no efi, which option have to chosen ?

Which option does GRUB#BIOS_systems use?
Eliminating none x86_64 entries leaves

x86_64-efi, x86_64-xen

Since you do not want an efi entry and the only other x86_64 entry is for the xen hypervisor that leaves no X86_64 entries as valid.
It might make sense to follow the guide if you still have trouble  post the commands you used and errors generated.

Offline

#10 2016-10-19 09:22:01

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: Grub don't boot new system

After failing with UEFI, I deleted /dev/sda2 and let /boot be a part of /
So again called grub-install with the following command:

Grub-install --target=i386-pc /dev/sda

And it seems works fine, also grub-mkconfig:

Grub-mkconfig -o /boot/grub/grub.cfg

generate config file but didn't generate vmlinuz initrm and ...
And because of this, when I want reboot my installation, grub shows me minimal bash-like environment that I can just type some command and I know this is because of mkconfig didn't generate other files.
Any idea ?


Freedom of mind with ArchLinux

Offline

#11 2016-10-19 09:57:03

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Grub don't boot new system

jiros wrote:
Grub-mkconfig -o /boot/grub/grub.cfg

generate config file but didn't generate vmlinuz initrm and ...

Why do you think grub-mkconfig should generate vmlinuz the linux kernel or initramfs-linux.img the initial ramdisk image.

Offline

#12 2016-10-19 10:27:00

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: Grub don't boot new system

Because always when the command dine, it wrote that files created in /boot or copied or something else
But this time, didn't does and /boot directory was empty except one folder that called grub
Also when I tried to run 'mkinitcpio -p linux' the command output was an error like something is wrong or can not find vmlinuz initram...

Last edited by jiros (2016-10-19 10:30:35)


Freedom of mind with ArchLinux

Offline

#13 2016-10-19 10:40:58

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Grub don't boot new system

jiros wrote:

Because always when the command dine, it wrote that files created in /boot or copied or something else
But this time, didn't does and /boot directory was empty except one folder that called grub

Another explanation is that the beacuse /boot was empty grub could not generate anything meaningful and so you saw no meaningful output to the console.

jiros wrote:

Also when I tried to run 'mkinitcpio -p linux' the command output was an error like something is wrong or can not find vmlinuz initram...

https://bbs.archlinux.org/viewtopic.php?id=57855

Offline

#14 2016-10-19 11:57:52

jiros
Member
From: Abadan, Khuzestan, Iran
Registered: 2013-10-23
Posts: 80

Re: Grub don't boot new system

Reinstalled with Bios grub in MBR works fine.
Anyway I have learned some new stuff :
For UEFI we need GPT partition table and a partition with EFI filesystem and secure boot disabled.
MBR can convert to GPT without lost data but in some drives.
I have to post the error exactly as loqs said by linking that thread.
And in the end, when you run sddm as root user or with sudo via unprivileged users, it shown you

could not find qdbus, can you call qdbus? 

that don't let you login but you have to start sddm with the following command :

Sudo systemctl start sddm.service

Last edited by jiros (2016-10-19 11:58:56)


Freedom of mind with ArchLinux

Offline

#15 2016-10-19 12:09:34

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: Grub don't boot new system

Hey jros,

I think I had a similar issue (https://bbs.archlinux.org/viewtopic.php?id=217442), at least grub also used to spit me out to the rescue shell and I had to manually point it towards my boot directory in that shell to boot up properly. I did that with:

# Inspect the current prefix (and other preset variables):
set
# Find out which devices are available:
ls
# Set to the correct value, which might be something like this:
set prefix=(hd0,1)/grub
set root=(hd0,1)
insmod normal
normal

This is from the grub manual.

In the end my issue occured, because I had another grub installed on another drive that interferred with boot up. After I used mkfs and wipefs to format and wipe this drive, my computer would boot up just fine.

Hope I could help.

Edit: Not sure if your issue was already solved, then just ignore my post.

Last edited by deafeningsylence (2016-10-19 12:11:11)

Offline

Board footer

Powered by FluxBB