Results 1 to 4 of 4

Thread: boot form mmcblk0 device

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    15

    boot form mmcblk0 device

    hello
    I have remstered image of knoppix 644 and everything work fine, but recently I found problem with one Al in One Acer computer.
    When booting from usb stick - all is ok, but i would like to boot from SD card. Acer has build in SD/MMC reader, but whem i put SD card with KOPPIX image and start booting boot process stops in place where it is looking for knoppix in block devices.

    I 've unpacked minirt.gz and tryed to modyfy init script for searching in mmcblk devices for Knoppix image.
    644 does not load driver for mmcblk devices so i copied mmc_core.ko mmc_block.ko sdhci.ko sdhci-pci.ko to modules dir and mdified init to load that modules and also make coresponding nodes in dev dir.
    Now i can mout mmcblk0p1 on mnt-system
    I packed minirt made iso and made bootabe SD

    Now when booting i get message - "knoppix found on mmcblk0p1" and "Do not remove medium until stop."
    But then i get /sbin/init help mesage insted of loading system.

    Could anybody help with this?

  2. #2
    Senior Member registered user
    Join Date
    Dec 2009
    Posts
    423
    Quote Originally Posted by marlas View Post
    I 've unpacked minirt.gz and tryed to modyfy init script for searching in mmcblk devices for Knoppix image.
    644 does not load driver for mmcblk devices so i copied mmc_core.ko mmc_block.ko sdhci.ko sdhci-pci.ko to modules dir and mdified init to load that modules and also make coresponding nodes in dev dir.
    Now i can mout mmcblk0p1 on mnt-system
    I packed minirt made iso and made bootabe SD

    Now when booting i get message - "knoppix found on mmcblk0p1" and "Do not remove medium until stop."
    But then i get /sbin/init help mesage insted of loading system.

    Could anybody help with this?
    You have modified minirt.gz ( ie init script ) and nobody knows what you have modified exactly but obviously there is a bug which you have introduced in your init script. Compare it with the original and check look through again what you have exactly changed.

  3. #3
    Junior Member
    Join Date
    Feb 2011
    Posts
    15

    biit from mmcblk0 device

    Hello

    Surely there is a bug.
    I'm not script guru and i did what I could.
    Meybe someone better in scripting could post modified init script with support booting from mmcblk device.

  4. #4
    Junior Member
    Join Date
    Feb 2011
    Posts
    15
    Hello
    Finally i get it working.

    What I have done: (Knoppix 644 )

    added nesessery modules to/modules
    changed load_modules for loading modules in proper order
    load_modules(){
    insmod /modules/mmc_core.ko
    insmod /modules/mmc_block.ko
    insmod /modules/sdhci.ko
    insmod /modules/sdhci-pci.ko
    # local mod
    # for mod in /modules/*.ko /modules/scsi/*.ko; do
    # [ -r "$mod" -a ! -d /sys/module/"${mod%.ko}" ] && insmod "$mod"
    # done
    }

    In Knoppix 6.7 there is no need for loadingmodules but it does not create nodes in /dev
    (I've remstered 644 form my needs and still using it, besides 6.7 has problems with ati mobility radeon HD 3650)

    added function
    mmcmt() {
    cat /proc/partitions | grep mmcblk >/dev/null
    if [ $? ]; then
    cat /proc/partitions | awk '$4 ~ /mmcblk/ { print "mknod ", "/dev/"$4, " b ", $1,$2 }' | while read line
    do
    $line
    done
    fi
    }

    modified listpartitions

    listpartitions(){
    local pattern file
    mmcmt
    for pattern in "$@"; do
    for file in $(find /sys/class/block -maxdepth 2 -name "$pattern"); do
    file="${file##*/}"
    [ -b "/dev/$file" ] && echo "/dev/$file"
    done
    done
    # awk 'BEGIN{old="__start"}/'"$1"'/{if($0==old){exit}else{old=$0;if($4&&$4!="name"){p rint "/dev/"$4}}}' /proc/partitions # Insufficient, does not find CD-Roms
    }

    added pattern for looking for knoppix
    if [ -z "$TSCLIENT" ]; then
    if [ -n "$root" ]; then
    if ! findknoppix $root; then
    if [ -d /sys/bus/usb/drivers/usb-storage ]; then
    for i in 1 2 3 4 5 6 7 8 9 10; do
    message -n -e "\r${CRE}${BLUE}${WAITFORUSB}${NORMAL}"
    sleep 2
    findknoppix $root && break
    done
    [ "$?" = "0" ] || debugshell "${CRE}${RED}${NOTFOUND}${NORMAL}"
    else
    debugshell "${CRE}${RED}${NOTFOUND}${NORMAL}"
    fi
    fi
    elif ! findknoppix $(listpartitions 'mmcblk[0-9]p[0-9]''hd[a-z]' 'hd[a-z][0-9]*' 'scd[0-9]*' 'sr[0-9]*' 'sd[a-z]' 'sd[a-z][0-9]*'); then
    if [ -d /sys/bus/usb/drivers/usb-storage ]; then
    for i in 1 2 3 4 5 6 7 8 9 10; do
    message -n -e "\r${CRE}${BLUE}${WAITFORUSB}${NORMAL}"
    sleep 2
    findknoppix $(listpartitions 'mmcblk[0-9]p[0-9]' 'scd[0-9]*' 'sr[0-9]*' 'sd[a-z]' 'sd[a-z][0-9]*') && break
    done
    [ "$?" = "0" ] || debugshell "${CRE}${RED}${NOTFOUND}${NORMAL}"
    fi
    fi
    fi

    and it works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


H261-Z61 2U 24SFF AMD Server 8x EPYC 7702 512-Cores 2048GB RAM 8x25G NIC 2x2200W picture

H261-Z61 2U 24SFF AMD Server 8x EPYC 7702 512-Cores 2048GB RAM 8x25G NIC 2x2200W

$13292.18



Dell PowerEdge R7525 Server 24X2.5(8XNVME)+H745 2xEPYC 7302 CPU 128G RAM 2x2400W picture

Dell PowerEdge R7525 Server 24X2.5(8XNVME)+H745 2xEPYC 7302 CPU 128G RAM 2x2400W

$3350.00



HP ProLiant Xeon E3-1220L V2 MicroServer Gen8 2.30 GHz 16 GB RAM NO DRIVES picture

HP ProLiant Xeon E3-1220L V2 MicroServer Gen8 2.30 GHz 16 GB RAM NO DRIVES

$199.99



HPE ProLiant MicroServer Gen8 Intel Xeon E3-1265L 16GB ECC PCIe x16 4x1TB HDD picture

HPE ProLiant MicroServer Gen8 Intel Xeon E3-1265L 16GB ECC PCIe x16 4x1TB HDD

$249.99



acer AC100 MicroServer, Xeon E3-1260L 2.40GHz, 16GB RAM, No HDD picture

acer AC100 MicroServer, Xeon E3-1260L 2.40GHz, 16GB RAM, No HDD

$87.17



SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount picture

SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount

$202.49



Supermicro E300-8D Xeon D-1518 2.20GHz Mini Server picture

Supermicro E300-8D Xeon D-1518 2.20GHz Mini Server

$574.99



Supermicro 5018A-FTN4 Rack Server - Black picture

Supermicro 5018A-FTN4 Rack Server - Black

$125.00



Supermicro 1U X11DPU 2x Xeon Gold 6132 2.6GHz / 128gb / 10x 2.5 Trays / 2x 750w picture

Supermicro 1U X11DPU 2x Xeon Gold 6132 2.6GHz / 128gb / 10x 2.5 Trays / 2x 750w

$649.99



1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE picture

1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE

$297.00