1. 服务器/VPS/主机用户Telegram电报群: https://t.me/openos
    黑群晖 Synology Telegram电报群: https://t.me/nasfan
    排除公告

U盘引导错误,有木有技术过硬的兄弟!!!

本帖由 askyanan2018-07-19 发布。版面名称:群晖 Synology DSM

  1. askyanan

    askyanan New Member

    注册:
    2018-05-15
    帖子:
    1
    开机引导的时候提示错误信息如下:

    error:failure reading sector 0x363d form 'hd0'
    以下是翻译后的错误信息:
    错误:读取扇区0x363D格式为“HD0”失败、

    DIY 的机器 装的是6.1.7系统 引导用的是jun大神步伐3617的引导
    弹出以上正常显示引导界面后,但是不自动进去,必须插上键盘手动敲回车才能正常启动。

    附图:

    [​IMG] [​IMG] [​IMG]

    附上grub.cfg
    代码:
    if serial --port=0x3F8 --speed=115200;then
            set has_serial=true
            terminal_input --append serial
            terminal_output --append serial
    else
            clear
    fi
    
    terminal_input --append console
    terminal_output --append console
    
    if [ x"${grub_platform}" = xefi ]; then
            insmod efi_gop
            insmod efi_uga
    else
            insmod vbe
    fi
    
    set extra_initrd="extra.lzma"
    set info="info.txt"
    
    set vid=0x058f
    set pid=0x6387
    set sn=A8ODN0XXXX
    set mac1=0011322CXXXX
    set rootdev=/dev/md0
    set netif_num=1
    set extra_args_3617=''
    
    set common_args_3617='syno_hdd_powerup_seq=0 HddHotplug=0 syno_hw_version=DS3617xs vender_format_version=2 console=ttyS0,115200n8 withefi elevator=elevator quiet syno_port_thaw=1'
    
    set sata_args='sata_uid=1 sata_pcislot=5 synoboot_satadom=1 DiskIdxMap=0C SataPortMap=1 SasIdxMap=0'
    
    set default='0'
    set timeout='1'
    set fallback='1'
    
    if [ -s $prefix/grubenv ]; then
            load_env
            if [ -n "$saved_entry" ]; then
                    set default="${saved_entry}"
            fi
    fi
    
    VERSION="with Jun's Mod v1.02b"
    
    search --file -s /zImage
    
    function savedefault {
            if [ -s $prefix/grubenv  ]; then
                    saved_entry="${chosen}"
                    save_env saved_entry
            fi
    }
    
    function do_option {
            if [ $# -lt 2 ]; then
                    eval "set value=\"\$1\""
                    echo "current $1: $value"; return;
            fi
            set key=$1
            shift
            set $key="$*"
            if [ -s $prefix/grubenv  ]; then
                    save_env $key
            fi
    }
    
    function vid { do_option vid $@; }
    function pid { do_option pid $@; }
    function sn { do_option sn $@; }
    function mac1 { do_option mac1 $@; }
    function mac2 { do_option mac2 $@; }
    function mac3 { do_option mac3 $@; }
    function mac4 { do_option mac4 $@; }
    function rootdev { do_option rootdev $@; }
    function append { do_option extra_args_3617 $@; }
    
    function vidpid {
            if [ $# -lt 2 ]; then
                    echo "usage: vidpid 0xVVVV 0xPPPP"; return;
            fi
            set usb_args="vid=$1 pid=$2"
            if [ -s $prefix/grubenv  ]; then
                    save_env usb_args
            fi
    }
    
    function showtips {
            if [ -n "$has_serial" ]; then
                    terminal_output --remove serial
            fi
            echo "Screen will stop updating shortly, please open http://find.synology.com to continue."
            echo
            echo
            if [ -n "$has_serial" ]; then
                    terminal_output --append serial
            fi
    }
    
    function loadinitrd {
            if [ -s $img/$info ]; then
                    if [ -n "$has_serial" ]; then
                            terminal_output --remove serial
                    fi
                    cat $img/$info
                    if [ -n "$has_serial" ]; then
                            terminal_output --append serial
                    fi
            fi
            if [ -s $img/$extra_initrd ]; then
                    initrd $img/rd.gz $img/$extra_initrd
            else
                    initrd $img/rd.gz
            fi
    }
    
    function common_add_option {
            eval "set value=\"\$1\""
            if [ -z $value ]; then return 1; fi
            set common_args="$common_args $1=$value"
    }
    
    function common_add_option_ex {
            eval "set value=\"\$1\""
            if [ -z $value ]; then return 1; fi
            set common_args="$common_args $2=$value"
    }
    
    function loadlinux {
            set model=$1
            set bootdev=$2
            shift 2
            if [ -n $vid -a -n $pid ]; then
                    set usb_args="vid=$vid pid=$pid"
            fi
            eval "set common_args=\"\$common_args_$model\""
            eval "set extra_args=\"\$extra_args_$model\""
            eval "set bootdev_args=\"\${bootdev}_args\""
            common_add_option_ex rootdev root
            common_add_option sn
            if common_add_option mac1; then set netif_num=1; fi
            if common_add_option mac2; then set netif_num=2; fi
            if common_add_option mac3; then set netif_num=3; fi
            if common_add_option mac4; then set netif_num=4; fi
            common_add_option netif_num
            if [ -z $zImage ]; then
                    set zImage=zImage
            fi
            linux $img/$zImage $common_args $bootdev_args $extra_args $@
    }
    
    menuentry "DS3617xs 6.1 Baremetal $VERSION" --class os {
            set img=
            savedefault
            loadlinux 3617 usb
            loadinitrd
            showtips
    }
    
    menuentry "DS3617xs 6.1 Baremetal $VERSION Reinstall" --class os {
            set img=
            loadlinux 3617 usb mfg
            loadinitrd
            showtips
    }
    
    #menuentry "DS3617xs 6.1 Baremetal AMD $VERSION" --class os {
    #        set img=
    #        set zImage=bzImage
    #        savedefault
    #        loadlinux 3617 usb
    #        loadinitrd
    #        showtips
    #}
    
    menuentry "DS3617xs 6.1 VMWare/ESXI $VERSION" --class os {
            set img=
            savedefault
            loadlinux 3617 sata
            loadinitrd
            showtips
    }
     
  2. yun1323

    yun1323 New Member

    注册:
    2017-08-29
    帖子:
    11
    重新制作一下应该就好了,我也遇到过,重新格式化,重新制作
     
  3. hugh200315

    hugh200315 Member

    注册:
    2018-06-04
    帖子:
    47
    更换U盘。。。。
     
  4. syf_alan

    syf_alan New Member

    注册:
    2018-08-10
    帖子:
    2
    进磁盘管理看下你的U盘有几个EFI分区
     
  5. hipone

    hipone New Member

    注册:
    2018-05-13
    帖子:
    27
    用什么写入工具?
     
  6. jiejie2004

    jiejie2004 Member

    注册:
    2017-05-21
    帖子:
    103
    u盘分区都删除掉。重新写入img试试。
     
  7. DannyChen

    DannyChen Member

    注册:
    2018-02-11
    帖子:
    42
    用命令列 diskpart 去將整個U盤清空
    簡單敘述

    cmd
    diskpart
    list disk
    select disk 1~9 (看U盤的實際位置,別選錯了)
    clean

    以上U盤會清空,得重新格式化
    格式化完後再去導入引導img