Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Password? #2

Open
lost-carrier opened this issue Nov 28, 2017 · 9 comments
Open

Initial Password? #2

lost-carrier opened this issue Nov 28, 2017 · 9 comments

Comments

@lost-carrier
Copy link

Sorry, probably I'm completely missing the point, but I have troubles getting this to run...

If I try your stuff from DockerHub (so without building myself)...

sudo docker run \
     --name xpenology \
     --volume xpenology_data:/image \
     --publish 5000:5000 \
     --env THREADS=1 \
     --env CORES=2 \
     --env MEMORY=2048 \
     --env DISK_SIZE=10G \
     --env AUTO_ATTACH=Y \
     --privileged \
     segator/xpenology:6.1.3-15152

...I end up in a Kernel Panic on that VM half a sec later...

When I try to start...

sudo docker run --interactive \
     --name xpenology \
     --volume xpenology_data:/image \
     --publish 5000:5000 \
     --env THREADS=1 \
     --env CORES=2 \
     --env MEMORY=2048 \
     --env DISK_SIZE=10G \
     --env AUTO_ATTACH=Y \
     --privileged \
     segator/xpenology:latest

...I actually get something booting. After some seconds I get asked for "Diskstation login:" and some password which I do not know and couldn't find googling. Actually DSM already responds at port 5000 with a standard login screen, but no hint on what password to use...

So I tried building that docker image by myself. What do you mean with "xpenology image"? I used this Jun Loader thingies (I've tried DS3615xs V6.1 and V6.0.2). Docker build went fine, but the VM shows some Grub screen and then locks up with blank screen on 100% CPU... nothing responding anymore...

I can provide all the log outputs I required...

Oh, and btw... AUTO_ATTACH appears to be necessary, but obviously does not have an effect on this issue (...a least I tried "Y" and "N" - no effect).

Erm... and yes, sorry, but I'm pretty new to this Xpenology...

Thanks in advance,
Losty

@segator
Copy link
Owner

segator commented Dec 9, 2017

yeah I know.. it doesn't work as expected..
It is a proof of concept
The user should be admin/1234

About the kernel panic I get the same problem some times when booting, if you reboot finally goes fine.

About AUTO_ATTACH is a parameter for the base I used for Docker/KVM from BBVA guys.

Feel free to PR any fix you can do.

@lost-carrier
Copy link
Author

Thanks for that pw.

I'm currently more working on getting my own synoboot.img (w/ 1.02b / DSM 6.1.x) to work.

As I found out, you have a whole different startvm-script in that docker-hub image compared to what is here on Github. So a docker build of this for me always resulted in locking up directly after the grub screen. Using a little Dockerfile like...

FROM segator/xpenology
 
COPY synoboot.img /default/boot.img

...worked better for booting and I actually could install a fresh DSM inside docker.

What is the reason for that difference? Is there certain kernel modules you expect to make this github-version running? I tried adding various virtio-modules, but that didn't work either...

About PoC: do you have a specific reason why you wouldn't recommend it for production? (...well at least some kind of "production" one would actually considering Xpenology for...)

@rrusso
Copy link

rrusso commented Jan 17, 2018

admin/1234 doesn't work. Not getting kernel panics or anything weird, just cannot log in. I'm on segator/xpenology:latest, btw.

@rrusso
Copy link

rrusso commented Jan 17, 2018

Wild guessing led me to find admin/123456 works!!! Playing with it now.

@qy2009
Copy link

qy2009 commented Feb 14, 2020

After running the interactive command, I was able to create and run this docker, and I can log in in the terminal. However I cannot access it with my browser, eventhough the port is forwarded.

from the docker terminal itself, when I tried ifconfig, it got the 169 ip address. Any idea why is that?
@lost-carrier @rrusso @segator

Thanks so much! I really hope this can be working :)

@segator
Copy link
Owner

segator commented Feb 14, 2020

Umh dhcp not working? Are u runing in host mode maybe?

@qy2009
Copy link

qy2009 commented Feb 14, 2020

I was running it on bridge mode, I noticed some errors in the log:

dnsmasq: junk found in command line

and this one:

Loading module ata_piix[ 31.852473] ata1: Read current link speed fail, retry 1

Also, I cannot select anything during the boot menu, is that correct?

Here is the complete log:

++ vtapdev=macvtapbdfeea
+++ ip link add link eth0 name macvtapbdfeea type macvtap mode bridge
++ ip link set macvtapbdfeea address 00:11:32:2C:A7:85
++ ip link set macvtapbdfeea up
++ ip link add link eth0 name macvlanbdfeea type macvlan mode bridge
++ ip link set macvlanbdfeea up

++ IFS=:
++ read major minor
+++ cat /sys/devices/virtual/net/macvtapbdfeea/tap2/dev
++ mknod /dev/macvtapbdfeea c 244 1

x
INFO: DHCP configured to serve IP 172.17.0.2/16 via macvlanbdfeea (attached to container's eth0)
INFO: Lauching dnsmasq

dnsmasq: junk found in command line

INFO: Launching qemu-kvm
char device redirected to /dev/pts/0 (label charserial0)
GNU GRUB version 2.02~beta2-9ubuntu1.12

+----------------------------------------------------------------------------+||||||||||||||||||||||||+----------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted.

  Press enter to boot the selected OS, `e' to edit the commands       

  before booting or `c' for a command-line.                            *DS3615xs 6.02 Baremetal with Jun's Mod v1.0                                 DS3615xs 6.02 Baremetal with Jun's Mod v1.0 Reinstall                       DS3615xs 6.02 Baremetal with Jun's Mod v1.0 Force Install                   DS3615xs 6.02 Baremetal AMD with Jun's Mod v1.0                             DS3615xs 6.02 VMWare/ESXI with Jun's Mod v1.0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The highlighted entry will be executed automatically in 1s.                    The highlighted entry will be executed automatically in 0s.                 START /linuxrc.syno

Insert basic USB modules...
:: Loading module usb-common ... [ OK ]
:: Loading module usbcore ... [ OK ]
:: Loading module ehci-hcd ... [ OK ]
:: Loading module ehci-pci ... [ OK ]
:: Loading module uhci-hcd ... [ OK ]
:: Loading module xhci-hcd ... [ OK ]
:: Loading module etxhci-hcd ... [ OK ]
:: Loading module usb-storage ... [ OK ]
.extras in linuxrc.syno
:: Loading module BusLogic ... [ OK ]
:: Loading module vmw_pvscsi ... [ OK ]
:: Loading module megaraid_mm ... [ OK ]
:: Loading module megaraid_mbox ... [ OK ]
:: Loading module megaraid ... [ OK ]
:: Loading module scsi_transport_spi ... [ OK ]
:: Loading module mptbase ... [ OK ]

:: Loading module mptscsih ... [ OK ]

:: Loading module mptspi ... [ OK ]

:: Loading module mptsas ... [ OK ]

:: Loading module mptctl ... [ OK ]

:: Loading module ata_piix[ 31.852473] ata1: Read current link speed fail, retry 1

[ 31.870496] ata1: Read current link speed fail, retry 2

[ 31.888546] ata1: Read current link speed fail, retry 3

[ 31.910486] ata2: Read current link speed fail, retry 1

[ 31.937489] ata2: Read current link speed fail, retry 2

[ 31.964479] ata2: Read current link speed fail, retry 3

... [ OK ]

:: Loading module megaraid_sas ... [ OK ]

:: Loading module mpt2sas ... [ OK ]

:: Loading module mpt3sas ... [ OK ]

Insert net driver(Mindspeed only)...

Starting /usr/syno/bin/synocfgen...

/usr/syno/bin/synocfgen returns 0

Partition Version=8

/sbin/e2fsck exists, checking /dev/md0...

1.42.6-8438: recovering journal

1.42.6-8438: |== | 3.7%
1.42.6-8438: |==== / 7.4%
1.42.6-8438: |===== - 11.1%
1.42.6-8438: |======= \ 14.7%
1.42.6-8438: |================================== | 70.5%
1.42.6-8438: |==================================== / 75.2%
1.42.6-8438: |====================================== - 78.3%
1.42.6-8438: |======================================== \ 83.2%
1.42.6-8438: |=========================================== | 89.4%
1.42.6-8438: |================================================| 100.0%

   28506 inodes used (18.31%, out of 155648)

    19 non-contiguous files (0.1%)


       8 non-contiguous directories (0.0%)


         # of inodes with ind/dind/tind blocks: 0/0/0


         Extent depth histogram: 25856/6


  229722 blocks used (36.90%, out of 622544)


       0 bad blocks


       1 large file





   22655 regular files


    2916 directories


       2 character device files


       0 block device files


       0 fifos


    1315 links


    2924 symbolic links (2634 fast symbolic links)


       0 sockets

   29812 files

/sbin/e2fsck returns 1

Mounting /dev/md0 /tmpRoot

------------upgrade

Begin upgrade procedure

No upgrade file exists

End upgrade procedure

============upgrade

Wait 2 seconds for synology manufactory device

Fri Feb 14 16:40:00 UTC 2020

/dev/md0 /tmpRoot ext4 rw,relatime,journal_checksum,data=ordered 0 0

none /sys/kernel/debug debugfs rw,relatime 0 0

sys /sys sysfs rw,relatime 0 0

none /dev devtmpfs rw,relatime,size=504916k,nr_inodes=126229,mode=755 0 0

proc /proc proc rw,relatime 0 0

linuxrc.syno executed successfully.

Post init

rc.extras in init.post

==================== start udevd ====================

===== trigger device plug event =====

@qy2009
Copy link

qy2009 commented Feb 14, 2020

@segator
If I don't use your docker and tried to build the container myself, I got this error:

INFO: No Initial Disk found, creating disk /image/disk.qcow2
Formatting '/image/disk.qcow2', fmt=qcow2 size=10737418240 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
INFO: KVM acceleration enabled
INFO: DHCP configured to serve IP 20.20.20.21/24 via dockerbridge
INFO: Lauching dnsmasq
DEBUG: dnsmasq options: --dhcp-range=20.20.20.21,20.20.20.21 --dhcp-host=00:11:32:2A:A6:13,,20.20.20.21,VirtualMachine,infinite --dhcp-option=option:netmask,255.255.255.0 --dhcp-option=option:dns-server,169.254.169.254 --dhcp-option=option:router,20.20.20.20 --dhcp-option=option:domain-search,#,all,known,uplink,DNS,servers.,This,file,lists,all,configured,domains.
vcn.oraclevcn.com --dhcp-option=option:domain-name,#
dnsmasq: junk found in command line

@Cosaque
Copy link

Cosaque commented Sep 1, 2020

work well with
admin:123456
i use this docker-compose :

version: '3'

services:
  Xpenology:
    image: "segator/xpenology:latest"
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    container_name: Xpenology
    restart: always

    networks:
      portainer_traefik_default:
        ipv4_address: 172.20.0.100
    volumes:
      - /home/docker/xpenology/data:/image
    environment:
      - THREADS=1
      - CORES=2
      - MEMORY=2048
      - DISK_SIZE=20G
      - AUTO_ATTACH=Y
    privileged: true

networks:
  portainer_traefik_default:
    external: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants