Re: Early boot debigging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI  Alexander
  I also meet some problem when using my system efi grub.
  I think if you just care about the kernel start process, you can
skip the grub.
  you can use follow cmd to emulate the kernel
  "qemu-system-x86_64 -kernel arch/x86_64/boot/bzImage -hda
linux-0.2.img -append root=/dev/sda"
  I do't know whether can solve your problem.

good luck.

Guoqing

On Sat, Nov 29, 2014 at 7:26 PM, Alexander Kuleshov
<kuleshovmail@xxxxxxxxx> wrote:
> Hello, thank you for reply,
>
> yes, previously my plan was grub2 + vmlinuz/initrd + qemu.
>
> I built disk with following instructions:
>
> dd if=/dev/zero of=disk.img count=163840 bs=4096
> fdisk fdisk (created one partition)
> sudo losetup /dev/loop0 disk.img
> sudo losetup /dev/loop1 disk.img -o 1048576
> sudo mke2fs /dev/loop1
> sudo mount /dev/loop1 /mnt
> sudo grub-install --root-directory=/mnt --no-floppy --modules="normal
> part_msdos ext2" /dev/loop0
>
> Than i copied vmlinuz and initrd from my /boot directory to /mnt/boot
> and created grub.cfg for grub:
> and Added to the /mnt/boot/grub/grub.cfg following:
>
> menuentry "My custom Linux" {
>         set root=(hd0,1)
>         linux /boot/vmlinuz-3.18.0-rc4+ root=/dev/sda1
>         initrd /boot/initrd.img-3.18.0-rc4+
> }
>
> And reinstalled grub with previous command. Now i'm trying to run it
> in qemu with:
>
> qemu-system-x86_64 disk.img
>
> I see grub menu, but after pressing on it only black screen without
> any errors/logs and etc: http://tinypic.com/r/i2pugh/8
>
> Can't understand what's wrong here
>
> Thank you.
>
> 2014-11-29 14:35 GMT+06:00 Guoqing Liu <lgqgood@xxxxxxxxx>:
>> Hi  Alexander
>>   I think  you can try qemu, I think it's better.
>>
>> good luck.
>>
>> On Sat, Nov 29, 2014 at 2:41 PM, Alexander Kuleshov
>> <kuleshovmail@xxxxxxxxx> wrote:
>>> Hello all,
>>>
>>> How can i debug early kernel booting, even before early_printk
>>> (x86_64). I'm interesting in part which starts to execute right after
>>> bootloader (https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S#L297).
>>> How to do it better? Write grub and vmlinuz to disk with
>>> losetup/grub-install and connect with gdb, or there is something
>>> another way to do it?
>>>
>>> Thank you.
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
>>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> Please read the FAQ at http://www.linux-learn.org/faqs
>>
>>
>>
>> --
>> good life
>
>
>
> --
> _________________________
> 0xAX



-- 
good life
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs




[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux