Menu

Toram: feature caused "Kernel Panic" during booting up - "Unable to find filesystem in medium"

Mohd Syah
2020-01-30
2020-02-26
  • Mohd Syah

    Mohd Syah - 2020-01-30

    Hi Steven, All,

    Just to share my findings and also to keep reference of the solution for others as well as future use.
    Because so far I have not found any one having this problem or no one has come up with the solution yet.

    My scenario is :

       - I have 2 versions on clonezilla for device comapibility sake (old slow pc and new faster pc)
       - for slow PC i use old version of clonezilla live inside directory "clonezilla"
       - for new faster pc I use latest stable clonezilla live inside directory "clonezillasvr"
       - As the name implies, **clonezillasvr** is also used as a lite server for stored image mass distribution in local network.
       - All of these is saved in 1 X 32gb thumbdrive.
       - Used Yumi to configure initial syslinux menu, then customised the menu to my own setting.
    

    My customised Boot Parameter looks like this:

    LABEL Restore Advantech Aperio HDD
    MENU LABEL Restore Advantech Aperio HDD
    LINUX /clonezilla/live/vmlinuz
    INITRD /clonezilla/live/initrd.img
    APPEND boot=live union=overlay hostname=aperiorecovery config components noswap edd=on nomodeset locales=en_US.UTF-8 keyboard-layouts=en quickreboot ocs_prerun="sudo bash /lib/live/mount/medium/scripts/UsbFsck" ocs_prerun1="mount /dev/sdb1 /mnt" ocs_prerun2="mount --bind -o noatime,nodiratime /mnt/backup/Advantech /home/partimag" ocs_prerun3="sudo bash /lib/live/mount/medium/scripts/prerunscript" ocs_postrun="sudo bash /lib/live/mount/medium/scripts/postrunscript" ocs_live_run="ocs-sr -e1 auto -e2 -c -r -icds -j1 -j2 -v -senc -fsck-y -p reboot restoreparts ask_user sda1 sda2" ocs_live_extra_param='' ocs_live_batch='no' vga=788 ip=frommedia nosplash hpet=disable noapic nolapic irqpoll live-media=/dev/sdb1 live-media-path=clonezilla/live toram=clonezilla/live,clonezilla/utils,clonezilla/EFI,clonezilla/syslinux,clonezilla/boot,clonezilla/home,clonezilla/.disk,clonezilla/scripts i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
    TEXT HELP
    Restore the Advantech Aperio's Hard Drive
    ENDTEXT
    

    Problem Description:

    - Panic error occurred when I set **live_media_path=clonezilla/live** **toram=clonezilla/syslinux,clonezilla/live**
    - Initially i struggled to understand what caused the Panic error during Initramfs boot up stage.
    - Then I started to do `cat boot.log | more` at the initramfs prompt.
    - I traced back to the part where **command was given to 'mkdir /run/live/medium/*clonezilla/live*'**
    - looks like mkdir was trying to make 2 directories (clonezilla & live) at once. Meaning the mkdir command **FAILED**.
    - But after failing, the code did not stop and continued to process the other remaining boot up code.
    - So the kernel thinks that actual **live_media_path** is **/run/live/medium/clonezilla/live**.
    - But I found out that the path donot exist. But this path exists **/run/live/medium/live** and also i found the**syslinux** folder in there as well.
    - As a workaround to the **mkdir**, i could just put the folders **clonezilla/live,clonezilla/syslinux** at root directory but that was not an ideal situation since I have 2 seperate clonezilla versions in the thumbdrive.
    - Hence, after testing, I found that by setting **live_media_path=live** I was able to boot up successfully.
    

    Here is my final (fixed) Boot Parameter:

    LABEL Restore Advantech Aperio HDD
    MENU LABEL Restore Advantech Aperio HDD
    LINUX /clonezilla/live/vmlinuz
    INITRD /clonezilla/live/initrd.img
    APPEND boot=live union=overlay hostname=aperiorecovery config components noswap edd=on nomodeset locales=en_US.UTF-8 keyboard-layouts=en quickreboot ocs_prerun="sudo bash /lib/live/mount/medium/scripts/UsbFsck" ocs_prerun1="mount /dev/sdb1 /mnt" ocs_prerun2="mount --bind -o noatime,nodiratime /mnt/backup/Advantech /home/partimag" ocs_prerun3="sudo bash /lib/live/mount/medium/scripts/prerunscript" ocs_postrun="sudo bash /lib/live/mount/medium/scripts/postrunscript" ocs_live_run="ocs-sr -e1 auto -e2 -c -r -icds -j1 -j2 -v -senc -fsck-y -p reboot restoreparts ask_user sda1 sda2" ocs_live_extra_param='' ocs_live_batch='no' vga=788 ip=frommedia nosplash hpet=disable noapic nolapic irqpoll live-media=/dev/sdb1 live-media-path=live toram=clonezilla/live,clonezilla/utils,clonezilla/EFI,clonezilla/syslinux,clonezilla/boot,clonezilla/home,clonezilla/.disk,clonezilla/scripts i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
    TEXT HELP
    Restore the Advantech Aperio's Hard Drive
    ENDTEXT
    

    Btw as you can see i also managed to run pre and post ocs scripts. And disabled Hpet, apic and lapic to reduce further kernel panics due to old system clock issues.

    If you need any pics I can include later.

     
  • Jeremy Boden

    Jeremy Boden - 2020-01-30
    • I traced back to the part where command was given to 'mkdir /run/live/medium/clonezilla/live'
    • looks like mkdir was trying to make 2 directories (clonezilla & live) at once. Meaning the mkdir command FAILED.

    mkdir -p /run/live/medium/clonezilla/live
    Will create all parent directories, where necessary, to allow creation of the full path.

     
  • Mohd Syah

    Mohd Syah - 2020-02-22

    Below attached is showing I manually listing directories after the initramfs panic terminal appeared:
    1) ls /run/live/medium/clonezillasvr/live - result = "No such file or directory"
    2) ls /run/live/medium/live - result = ok

    This proves that the rsync -a --progress command during boot up did not replicate the desired live directory properly.

     
  • Mohd Syah

    Mohd Syah - 2020-02-22

    Attached is the rsync command during debian live boot up.

    Btw the live_media_path=live FAILED. As a workaround, I copied clonezillasvr/live contents to root /live.

     
  • Steven Shiau

    Steven Shiau - 2020-02-23

    So this issue occurs only when you want to keep two versions of Clonezilla live on the same machine's hard drive?

    Steven

     
    • Mohd Syah

      Mohd Syah - 2020-02-23

      Hi Steven

      Basically what i observed is when clonezilla live is in nested directory
      (eg. /Example/live ) rather than in root directory (eg. /Live), the
      toram function will result in kernel panic due to initramfs unable to
      find live medium, due to improper rsync copy to ram bcos rsync did not
      replicate the directories as per live_media_path definition in the cfg
      file.

      I believe this the kernel panic most of the users encounters when using
      toram feature.

      I believe by making rsync replicate the directory structure in ram is the
      best way to resolve this issue.

      Or if my config is wrong, please let me know.

      Thank you Mr Steven Shiau.

      On Sun, 23 Feb 2020, 15:43 Steven Shiau, steven_shiau@users.sourceforge.net
      wrote:

      So this issue occurs only when you want to keep two versions of Clonezilla
      live on the same machine's hard drive?

      Steven

      Toram: feature caused "Kernel Panic" during booting up - "Unable to find
      filesystem in medium"
      https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/960ef4ef57/?limit=25#69cf


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Steven Shiau

    Steven Shiau - 2020-02-23

    If would be easier if you can provide the patch file for live-boot package, I believe it's about patching this file:
    components/9990-toram-todisk.sh
    Then we can try to let the upstream accept that.

    Steven

     

Log in to post a comment.

MongoDB Logo MongoDB