上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

kiyoshi's help in English

KIYOSHI'S help
Kexec Integrated Yakky Open-Source Helper Init Script


TOUGH LINUX KERNEL LOADER
USING UBUNTU KERNEL

Thanks to Ubuntu kernel, kexec and dialog




The information in this page is distributed in the hope that it will be useful but without any warranty.
The author (Kiyoshi SUZUKI) does not accept responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all.
No warranty is made about the information in this page.
The author does not make amends for the trouble caused by the information in this page.
Use at your own risk.




Table of contents:

What's this?

How to generate kiyoshi's help on your working Ubuntu

How to enable kiyoshi's help on your working Ubuntu

How to boot linux distributions using kiyoshi's help

How to download bootable CD iso file

How to strengthen kiyoshi's help

How to make bootable CD

License



What's this?



kiyoshi's help is messy init script written by Kiyoshi SUZUKI in Fukui, JAPAN, which helps booting the linux distributions.

You can make your original kernel loader based on Linux kernel and kexec-tools with kiyoshi's help.


kiyoshi's help can:

Boot linux distributions by using any of the following configuration files:
  • GRUB2 configuration file /boot/grub/grub.cfg
  • GRUB LEGACY configuration file /boot/grub/menu.lst
  • SYSLINUX configuration file /boot/syslinux/syslinux.cfg
  • ISOLINUX configuration file /boot/isolinux/isolinux.cfg
  • EXTLINUX configuration file /boot/extlinux/extlinux.conf
  • LILO configuration file /etc/lilo.conf


  • Boot Ubuntu by selecting the partition Ubuntu are installed on, using symlink /vmlinuz and /initrd.img

    Boot Ubuntu installed by Wubi by selecting the partitions containing /ubuntu/disks/root.disk

    Boot linux distributions by typing custom command line (bash like)

    kiyoshi's help can boot linux distributions,

    Even if the linux distribution is installed on the media from which BIOS does not support the boot,for example, USB-devices, USB-3.0-devices, or on BTRFS (not bootable from GRUB2), or on LVM

    Even if the other boot loader (or kernel loader) cannot boot the linux distributions because of trouble,

    Even if the other boot loaders are not installed on MBR or PBR of the media.


    To use kiyoshi's help, you can:
    1) generate kiyoshi's help on your running Ubuntu, and enable kiyoshi's help
    or
    2) download bootable CD iso file, decompress and burn to CD-R or DVD-R media, and boot with the media.

    How to use kiyoshi's help is written here.




    How to generate kiyoshi's help on your working Ubuntu



    Open terminal, for example, by clicking "Application" -> "Accsessory" -> "Terminal"

    Type
    sudo apt-get update
    sudo apt-get install kexec-tools dialog


    Then, restart Ubuntu to activate kexec-tools.

    Open text editor, for example, by clicking "Application" -> "Accsessory" -> "Text Editor"

    Paste the contents of

    makekiyoshishelp.sh for Ubuntu 10.10

    makekiyoshishelp.sh for Ubuntu 11.04

    into the opened text editor.

    Save to the file for example, "makekiyoshishelp.sh" in your home directory (/home/USER_ACCOUNT)

    Open terminal, for example, by clicking "Application" -> "Accsessory" -> "Terminal"

    Type
    bash ./makekiyoshishelp.sh


    A text editor window will open.

    Replace all contents of the opened text editor window by the contents of the following file: init

    init for Ubuntu 10.10.

    init for Ubuntu 11.04.


    Save the file, quit the text editor, then the following message will be shown in the terminal.

    initrd.img-kiyoCs is generated in
    ... Please use it with /boot/vmlinuz-...

    The kiyoshi's help (initrd.img-kiyoCs) is generated in the current directory.

    The contents of initrd.img-kiyoCs is in the directory "initrd" in the current directory.

    You can erase the "initrd" directory in the current directory.



    How to enable kiyoshi's help on your working Ubuntu



    kiyoshi's help and its initramfs(initrd.img-kiyoCs) cannot work without kernel.

    So, you must have Ubuntu kernel (/boot/vmlinuz-
    ...) and initrd.img-kiyoCs read at boot time in order to use kiyoshi's help.

    One way is to make boot CD or DVD with the method described in "How to make bootable CD".

    The other way is setting up the current active kernel loader.
    If you have kernel loader (for example, grub2, grub legacy, syslinux, isolinux, extlinux, lilo, grub4dos) installed in internal hard disk in your computer, you can set up the kernel loader to read Ubuntu kernel and initrd.img-kiyoCs.

    Copy the working Ubuntu kernel and initrd.img-kiyoCs into the partition on the internal hard disk, which your kernel loader can access at boot time.

    To check the version of the Ubuntu kernel, type the following in the terminal:

    Type
    uname -r


    The kernel version will be for example,

    2.6.35-25-generic

    In the above case, the working kernel may be:

    /boot/vmlinuz-
    2.6.35-25-generic

    # GRUB2 #


    In the terminal, type the following:

    gksu gedit /etc/grub.d/40_custom


    If your password is asked, please type.

    At the end of the openned text editor window, add the following:


    menuentry "kiyoshi's help thanks to Ubuntu kernel and kexec-tools" {
    set root=(hd
    %,@)
    linux /vmlinuz-
    2.6.35-25-generic
    initrd /initrd.img-kiyoCs
    }

    You must change "
    2.6.35-25-generic" to the version of the working Ubuntu kernel.

    % should be the number of the media (hard disk, USB flash, and so on) where initrd.img-kiyoCs is copied. The number of the first media is "0". The number of the second media is "1".

    @ should be the number of the partition where initrd.img-kiyoCs is copied.

    Finally, type the following in the terminal:

    sudo update-grub


    This will enable the entry in GRUB2.


    # GRUB legacy & GRUB4DOS #


    In the terminal, type the following:

    gksu gedit /boot/grub/menu.lst


    If your password is asked, please type.

    At the end of the openned text editor window, add the following:

    title kiyoshi's help thanks to Ubuntu kernel and kexec-tools
    root=(hd
    %%,@@)
    kernel /vmlinuz-
    2.6.35-25-generic
    initrd /initrd.img-kiyoCs


    You must change "
    2.6.35-25-generic" to the version of the working Ubuntu kernel.

    %% should be the number of the media (hard disk, USB flash, and so on) where initrd.img-kiyoCs is copied. The number of the first media is "0". The number of the second media is "1".

    @@ should be the number of the partition where initrd.img-kiyoCs is copied. The number of the first partition is "0". The number of the second partition is "1".


    How to boot linux distributions using kiyoshi's help


    On boot, load kernel vmlinuz-... and initrd.img-kiyoCs, either by grub2, grub legacy and so forth, or select "kiyoshi's help..." in booting with bootable CD.

    After kernel and initramfs are loaded and booted, kiyoshi's help (init script) starts running.
    Many lines may be displayed.
    If you think enough time passed to detect the media where linux distributions you want to boot is installed, press ENTER key.

    A quasi-window opened and lists the partitions detected.
    Select the partition.

    Select the type of things you want to do.
    For example,
    Search Grub, Sys(iso,ext)linux, Lilo setting or Wubi
    or
    Use shell (busybox)
    You can select or deselect by pushing space key.
    If you deselect all, ubuntu kernel will be searched.

    If you select "Search", you will see the select menu. Select "select title."
    Detected booting option (menu) will be shown.
    Select one of the detected booting options.
    The contents of the booting option will be shown. The detected boot parameters, i.e., kernel, initramfs, and kernel options will be displayed.
    If you think they are good, select yes (press enter key).
    If you think something is wrong, you can change the parameters. Select c by DOWN key and type the modified parameters.

    If you select "Use shell (busybox)", you drop in to busybox, small shell interface.
    You can use kexec command, such as
    mount -t auto /dev/[device file name such as sda1] /mnt
    kexec -l
    [kernel file name in full path] --initrd=[initramfs file name in full path] --append="[options given to kernel]"
    kexec -e

    Please be noticed that full path needs to include the mounted directory, for example, /mnt.
    Usually, the selected partition is mounted on /mnt.
    It may be useful to push TAB key for automatic complement.
    You can use "ls", "blkid", "cat" and so on.
    For the commands available, please refer to busybox online manual.



    How to download bootable CD iso file



    Downloadable zip-compressed iso image file is available at
    http://www3.bigupload.com/

    Decompress(unzip) the downloaded file, then you will get
    kiyoshishelp110313.iso

    You can check whether the decompressed file is the same as the original one or not,
    by
    sha1sum kiyoshishelp110313.iso


    Tha sha1sum value of the original file:
    kiyoshishelp110313.iso
    is
    9ad97b32fe4a2da17194616b549654d9e851a713

    Burn
    kiyoshishelp110313.iso
    to CD-R, or DVD-R, and boot with the burned CD or DVD.

    The downloadable boot CD iso file image utilize the great kernel loader "GRUB4DOS".




    How to strengthen kiyoshi's help



    You can strengthen the ability of kiyoshi's help to recognize the partition where linux is installed.
    The way is to add the correct modules to initramfs.
    First, you must recognize the partition where the linux distribution you want to boot is installed, in running Ubuntu.
    Then make sure what modules are in use, by typing in the terminal,
    lsmod


    You can set necessary modules to be added in initramfs, by adding the lines in /etc/initramfs-tools/modules.
     gksu gedit /etc/initramfs-tools/modules

    Add the module file name, one for each line, omitting path name and ".ko".
    For example,for Ubuntu10.10 (with kernel version >= 2.6.34)
    xhci_hcd
    usbhid
    hid
    usb_storage
    btrfs
    lvm2

    or,for Ubuntu10.04 (with kernel version < 2.6.34)
    xhci
    usbhid
    hid
    usb_storage
    btrfs
    lvm2



    And at last, you should update initramfs, by typing:
    sudo update-initramfs -u


    It should be noticed that the started linux cannot boot correctly if the initramfs lacks the correct modules to recognize the partition even if kiyoshi's help can load the correct linux kernel and initramfs.



    How to make bootable CD



    First, generate an initramfs file with kiyoshi's help init script named initrd.img-kiyoCs by the method described in "How to generate kiyoshi's help on your working Ubuntu".

    Download grub4dos-0.4.4.zip and decompress to generate a directory named "grub4dos-0.4.4".

    Make a directory and name it "iso_root".
    Copy the following 4 files into the made directory "iso_root".
  • initrd.img-kiyoCs

  • /boot/vmlinuz-... (current working kernel)

  • grldr (in the decompressed "grub4dos-0.4.4" directory)

  • menu.lst (in the decompressed "grub4dos-0.4.4" directory)


  • The version of the current working kernel is shown by typing the following in terminal.
    uname -r


    Start editing the copied "menu.lst" file by double-clicking the file or typing the following in terminal.
    gksu gedit [full path of the copied "menu.lst" file]/menu.lst


    Add the following lines before the first line starting with "title".
    title kiyoshi's help thanks to Ubuntu kernel and kexec-tools
    kernel /vmlinuz-
    ...
    initrd /initrd.img-kiyoCs



    Please type the correct file name of the copied kernel, such as "
    vmlinuz-2.6.35-25-generic" instead of "vmlinuz-...".

    In terminal, change directory to the parent directory which contains the "iso_root" directory and type the following.
    mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o kiyoshishelp.iso iso_root

    An iso image file named kiyoshishelp.iso will be generated. It is the bootable CD iso image file. Burn it to CD-R and boot with the burned CD.



    License


    The author (Kiyoshi SUZUKI) is not familiar with the license of Ubuntu.

    The author did not change any binary of Ubuntu. The author only changed the init in the initramfs file (initrd.img) and deleted some files in the initramfs file (initrd.img) of Ubuntu.

    The bootable CD image contains the great kernel loader "GRUB4DOS".

    If you think the author violated the license of somebody, please let the author know by writing the comments in this blog.



    This blog is last updated at 2011/4/30.
関連記事

テーマ : Linux
ジャンル : コンピュータ

コメントの投稿

管理者にだけ表示を許可する

プロフィール

kiyoshi

Author:kiyoshi
FC2ブログへようこそ!

最新記事
最新コメント
最新トラックバック
月別アーカイブ
カテゴリ
検索フォーム
RSSリンクの表示
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QRコード
since 2011/9/25
現在の閲覧者数:
上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。