0

So I have been trying to set up raspberry pi 4 os (the recommended, Raspbian 3.2 GB) on a 32 GB micro sd card.

But I have some critical situation where I am low on resources.

So here is the list of components/devices that I HAVE:

  1. raspberry pi 4
  2. android device(for writing os image on sd card using RasPi image)Pi SD Card Imager App / RasPi Card Imager
  3. a laptop with vnc client and ssh tools installed to access raspi

Some seemingly important things that I DO NOT HAVE are as follows:

  1. HDMI to micro HDMI(so cannot avoid headless setup)
  2. a dedicated monitor
  3. any kind of sdcard reader(so I cannot use laptop for writing raspberry pi os on sdcard)

Here's what I have tried: (by referring these steps on How to Set Up a Headless Raspberry Pi, Without Ever Attaching a Monitor - tom's HARDWARE)

  1. put my micro sd card into android device(this step is the only difference where I use android instead of pc to write os image)
    a. formatted sdcard
    b. chose sd card and os
    c. selected option headless installation and enable ssh d. then clicked on write
  2. after writing to the sdcard on android device I added 2 files in the sd card root dir(by connecting my laptop to android device and then pasting the files there) as described in the steps
    a. blank ssh file(without extension) b. wpa_supplicant.conf file to add wifi ssid and password
  3. then put the microsd card in pi, connected the power supply and was waiting to see some devices to be connected to the wifi network(android device hotspot)

after this process an extra device was connected to wifi hotspot named recovery.. with a particular ip address.

the tried connecting to this by ssh > ssh pi@192.168.43.xxx and > ssh 192.168.43.xxx

both the attempts resulted to ssh connection refused..

BTW, this attempt is on a second raspberry pi machine.. the first raspi setup had hdmi(connected to home tv) in which I can say that the way I wrote the image using android device was successful


**UPDATE**

Added below the files and folder that are there after writing using RasPi imager.

Putting this info as I think (not sure) that using RasPi imager (android app) maybe a bit different from Raspberry Pi Imager (windows s/w)

Folder PATH listing
Volume serial number is D01A-3112
E:.
│   bcm2708-rpi-b-plus.dtb
│   bcm2708-rpi-b-rev1.dtb
│   bcm2708-rpi-b.dtb
│   bcm2708-rpi-cm.dtb
│   bcm2708-rpi-zero-w.dtb
│   bcm2708-rpi-zero.dtb
│   bcm2709-rpi-2-b.dtb
│   bcm2710-rpi-2-b.dtb
│   bcm2710-rpi-3-b-plus.dtb
│   bcm2710-rpi-3-b.dtb
│   bcm2710-rpi-cm3.dtb
│   bcm2711-rpi-4-b.dtb
│   bcm2711-rpi-cm4.dtb
│   bootcode.bin
│   BUILD-DATA
│   config.txt
│   fixup4rc.dat
│   fixup_rc.dat
│   INSTRUCTIONS-README.txt
│   recover4.elf
│   recovery.cmdline
│   recovery.elf
│   recovery.img
│   recovery.rfs
│   recovery7.img
│   recovery7l.img
│   RECOVERY_FILES_DO_NOT_EDIT
│   riscos-boot.bin
│   ssh
│   wpa_supplicant.conf
│
├───defaults
│   └───slides
│           A.png
│
├───os
│   └───Raspberry_Pi_OS
│           boot.tar.xz
│           marketing.tar
│           os.json
│           partitions.json
│           partition_setup.sh
│           Raspberry_Pi_OS_(32-bit).png
│           root.tar.xz
│
└───overlays
        act-led.dtbo
        adau1977-adc.dtbo
        adau7002-simple.dtbo
        ads1015.dtbo
        ads1115.dtbo
        ads7846.dtbo
        adv7282m.dtbo
        adv728x-m.dtbo
        akkordion-iqdacplus.dtbo
        allo-boss-dac-pcm512x-audio.dtbo
        allo-digione.dtbo
        allo-katana-dac-audio.dtbo
        allo-piano-dac-pcm512x-audio.dtbo
        allo-piano-dac-plus-pcm512x-audio.dtbo
        anyspi.dtbo
        apds9960.dtbo
        applepi-dac.dtbo
        at86rf233.dtbo
        audioinjector-addons.dtbo
        audioinjector-isolated-soundcard.dtbo
        audioinjector-ultra.dtbo
        audioinjector-wm8731-audio.dtbo
        audiosense-pi.dtbo
        audremap.dtbo
        balena-fin.dtbo
        cma.dtbo
        dht11.dtbo
        dionaudio-loco-v2.dtbo
        dionaudio-loco.dtbo
        disable-bt.dtbo
        disable-wifi.dtbo
        dpi18.dtbo
        dpi24.dtbo
        draws.dtbo
        dwc-otg.dtbo
        dwc2.dtbo
        enc28j60-spi2.dtbo
        enc28j60.dtbo
        exc3000.dtbo
        fe-pi-audio.dtbo
        goodix.dtbo
        googlevoicehat-soundcard.dtbo
        gpio-fan.dtbo
        gpio-ir-tx.dtbo
        gpio-ir.dtbo
        gpio-key.dtbo
        gpio-no-bank0-irq.dtbo
        gpio-no-irq.dtbo
        gpio-poweroff.dtbo
        gpio-shutdown.dtbo
        hd44780-lcd.dtbo
        hdmi-backlight-hwhack-gpio.dtbo
        hifiberry-amp.dtbo
        hifiberry-dac.dtbo
        hifiberry-dacplus.dtbo
        hifiberry-dacplusadc.dtbo
        hifiberry-dacplusadcpro.dtbo
        hifiberry-dacplusdsp.dtbo
        hifiberry-dacplushd.dtbo
        hifiberry-digi-pro.dtbo
        hifiberry-digi.dtbo
        highperi.dtbo
        hy28a.dtbo
        hy28b-2017.dtbo
        hy28b.dtbo
        i-sabre-q2m.dtbo
        i2c-bcm2708.dtbo
        i2c-gpio.dtbo
        i2c-mux.dtbo
        i2c-pwm-pca9685a.dtbo
        i2c-rtc-gpio.dtbo
        i2c-rtc.dtbo
        i2c-sensor.dtbo
        i2c0.dtbo
        i2c1.dtbo
        i2c3.dtbo
        i2c4.dtbo
        i2c5.dtbo
        i2c6.dtbo
        i2s-gpio28-31.dtbo
        ilitek251x.dtbo
        imx219.dtbo
        imx290.dtbo
        imx477.dtbo
        iqaudio-codec.dtbo
        iqaudio-dac.dtbo
        iqaudio-dacplus.dtbo
        iqaudio-digi-wm8804-audio.dtbo
        irs1125.dtbo
        jedec-spi-nor.dtbo
        justboom-both.dtbo
        justboom-dac.dtbo
        justboom-digi.dtbo
        ltc294x.dtbo
        max98357a.dtbo
        maxtherm.dtbo
        mbed-dac.dtbo
        mcp23017.dtbo
        mcp23s17.dtbo
        mcp2515-can0.dtbo
        mcp2515-can1.dtbo
        mcp3008.dtbo
        mcp3202.dtbo
        mcp342x.dtbo
        media-center.dtbo
        merus-amp.dtbo
        midi-uart0.dtbo
        midi-uart1.dtbo
        miniuart-bt.dtbo
        mmc.dtbo
        mpu6050.dtbo
        mz61581.dtbo
        ov5647.dtbo
        ov7251.dtbo
        ov9281.dtbo
        papirus.dtbo
        pibell.dtbo
        piglow.dtbo
        piscreen.dtbo
        piscreen2r.dtbo
        pisound.dtbo
        pitft22.dtbo
        pitft28-capacitive.dtbo
        pitft28-resistive.dtbo
        pitft35-resistive.dtbo
        pps-gpio.dtbo
        pwm-2chan.dtbo
        pwm-ir-tx.dtbo
        pwm.dtbo
        qca7000.dtbo
        README
        rotary-encoder.dtbo
        rpi-backlight.dtbo
        rpi-cirrus-wm5102.dtbo
        rpi-dac.dtbo
        rpi-display.dtbo
        rpi-ft5406.dtbo
        rpi-poe.dtbo
        rpi-proto.dtbo
        rpi-sense.dtbo
        rpi-tv.dtbo
        rpivid-v4l2.dtbo
        rra-digidac1-wm8741-audio.dtbo
        sc16is750-i2c.dtbo
        sc16is752-i2c.dtbo
        sc16is752-spi0.dtbo
        sc16is752-spi1.dtbo
        sdhost.dtbo
        sdio.dtbo
        sdtweak.dtbo
        sh1106-spi.dtbo
        smi-dev.dtbo
        smi-nand.dtbo
        smi.dtbo
        spi-gpio35-39.dtbo
        spi-gpio40-45.dtbo
        spi-rtc.dtbo
        spi0-cs.dtbo
        spi1-1cs.dtbo
        spi1-2cs.dtbo
        spi1-3cs.dtbo
        spi2-1cs.dtbo
        spi2-2cs.dtbo
        spi2-3cs.dtbo
        spi3-1cs.dtbo
        spi3-2cs.dtbo
        spi4-1cs.dtbo
        spi4-2cs.dtbo
        spi5-1cs.dtbo
        spi5-2cs.dtbo
        spi6-1cs.dtbo
        spi6-2cs.dtbo
        ssd1306-spi.dtbo
        ssd1306.dtbo
        ssd1351-spi.dtbo
        superaudioboard.dtbo
        sx150x.dtbo
        tc358743-audio.dtbo
        tc358743.dtbo
        tinylcd35.dtbo
        tpm-slb9670.dtbo
        uart0.dtbo
        uart1.dtbo
        uart2.dtbo
        uart3.dtbo
        uart4.dtbo
        uart5.dtbo
        udrc.dtbo
        upstream-pi4.dtbo
        upstream.dtbo
        vc4-fkms-v3d.dtbo
        vc4-kms-kippah-7inch.dtbo
        vc4-kms-v3d-pi4.dtbo
        vc4-kms-v3d.dtbo
        vga666.dtbo
        w1-gpio-pullup.dtbo
        w1-gpio.dtbo
        w5500.dtbo
        wittypi.dtbo
  • **ssh** file should be placed into **/boot/** folder , i.e. into **root of the "boot" partition** – Maxim Sagaydachny Jun 12 '21 at 11:45
  • @MaximSagaydachny, FYI, actually I do have a lot of idea of partitions, or other things related to os booting/installing, but from your words (like 'boot'), etc. I tried finding occurrences of 'boot' in the file names that were created by raspi imager in sd card in which I only found a file as SDCard/os/Raspberry_Pi_OS/boot.tar.xz, is there anything that can be done with this file? thank you for responding – Ameya Kalyankar Jun 13 '21 at 14:48
  • just buy card reader and be done with it. btw, [one of the users claims that "...imager can enable ssh directly, can install systems headless..."](https://play.google.com/store/apps/details?id=com.redrobe.raspicardimager&reviewId=gp%3AAOqpTOF5Zvxt5Nqx8wk95iJqOtaOM6Cn1An0Po_x6iqD7P0vpqNkX_Rj1NpjOMy_f9B16jHHmsCsM9rJFZGb). Did you check UI of the app? if this claim is true then you can just check some checkbox and imager will place ssh file into proper place. – Maxim Sagaydachny Jun 13 '21 at 15:16
  • content of your sd card is temporary - it is not raspbian. imager creates run-time environment which will transform SD card into proper raspbian sd card during first boot AT RPI. so obviously ssh file should be inside boot.tar.xz - this tarball will be unpacked into new partition. check UI of imager - most likely it places ssh file into this tarball when you click something in settings. – Maxim Sagaydachny Jun 13 '21 at 15:42
  • I have been selecting the checkbox on the UI for enabling ssh from the very beginning. And for the first time(when I had a display), it actually worked as I did not have to enable ssh separately it, but this time when I do not have a display, things are not working out, it just says "ssh refused". Now this actually points to multiple possibilities, like the installation never completed properly(because I saw the connection to my wifi as recovery whereas it should be raspberry-pi or something), or the ssh did not setup properly, or maybe something else than this. – Ameya Kalyankar Jun 17 '21 at 06:40
  • buy card reader – Maxim Sagaydachny Jun 17 '21 at 06:44
  • @MaximSagaydachny, I understand your point when you say "just buy card reader and be done with it". But this is way of installing raspberry pi is pretty possible with only the common things that you have like an android device and a laptop(or pc). So I had hoped or am still hoping that this could help some more people out there to get this done with only an android device and a laptop maybe(without need of any display, or sd card reader). And also the way this seems so possible makes me wanna complete this somehow and not leave it unexplored. hope you understance – Ameya Kalyankar Jun 17 '21 at 06:51
  • your card contain NOOBS so probably [this tutorial will be relevant to you](https://levelup.gitconnected.com/headless-installation-of-raspberry-pi-using-noobs-and-make-it-ready-for-ssh-ad9a94babd85) – Maxim Sagaydachny Jun 17 '21 at 07:15

0 Answers0