Edit the /etc/inittab file

Are there some way I can edit the /etc/inittab file, without access to the Arduino Yun via wifi, ethernet and YunSerialTerminal?

I tried to make a proof and edited the file commenting the last line:

::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
#ttySPI0::respawn:/bin/ash --login

And now I have no wifi nor ethernet access?

Thanks

Having never used a yun I am not absolutely sure if you could edit that particular file from the failsafe mode. I do, however, think that the following link might be of some help in gaining access to a CLI.

Restoring a Yun

Thanks for your reply

I tried it, but it doesn’t works.

I installed in my Yun LininoOS and LininoIO, even though LininoOS is a version of OpenWRT I don’t know if I have this option (failsave mode) to reset from U-boot.

I uploaded YunSerialTerminal and press YUN RST and the result is this:

U-Boot 1.1.4-linino-g335e76c8-dirty (Mar  5 2015 - 09:56:20)

Linino Board (ar9331) U-boot
DRAM:  64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 217k for U-Boot at: 83fc8000
Reserving 192k for malloc() at: 83f98000
Reserving 44 Bytes for Board Info at: 83f97fd4
Reserving 36 Bytes for Global Data at: 83f97fb0
Reserving 128k for boot params() at: 83f77fb0
Stack Pointer at: 83f77f98
Now running in RAM - U-Boot at: 83fc8000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16777216, sector count = 256
Flash: 16 MB
In:    serial
Out:   serial
Err:   serial
Net:   eth0: b4:21:8a:00:00:00
eth1: b4:21:8a:00:00:01
eth0, eth1
autoboot in 4 seconds (stop with 'lin')...
## Booting image at 9fea0000 ...
   Image Name:   MIPS OpenWrt Linux-3.3.8
   Created:      2015-02-03  14:03:09 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1129750 Bytes =  1.1 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0x9fea0040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 3.3.8 (build@build-base) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Tue Feb 3 15:02:42 CET 2015
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00004000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00004000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  console=spicons board=linino-yun mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14656k(rootfs),1280k(kernel),64k(nvram),64k(art),15936k@0x50000(firmware) mem=64M rootfstype=squashfs,jffs2 noinitrd rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 61004k/65536k available (2416k kernel code, 4532k reserved, 686k data, 216k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.080000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 29 on device: ath79
[    0.090000] MIPS: machine is Arduino Yun
[    0.530000] mach-linino: setting GPIO
[    0.530000] Setting GPIO OE 21
[    0.540000] Setting GPIO OE2 22
[    0.540000] Setting GPIO UART-ENA 23
[    0.540000] mach-linino: enabling GPIO SPI Controller
[    0.550000] bio: create slab <bio-0> at 0
[    0.560000] Switching to clocksource MIPS
[    0.570000] NET: Registered protocol family 2
[    0.570000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.570000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.570000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.570000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.570000] TCP reno registered
[    0.570000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.580000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.580000] NET: Registered protocol family 1
[    0.600000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.600000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.610000] msgmni has been set to 119
[    0.610000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.610000] io scheduler noop registered
[    0.620000] io scheduler deadline registered (default)
[    0.620000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.630000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART
[    0.630000] console [spicons0] enabled, bootconsole disabled

As you can see I never get the option of enter failsave mode.

In other way I tried to reset pressing the WLAN RST for at least 30 second and nothing happened.

Are there another way to revive the Yun?
If it helps, I’m working over the Yun from a laptop with windows 7 x64

Thanks

Okay. Is that all the output you get from the board?

You should still be able to re-install Linino via U-boot by typing "lin" when prompted to interrupt the boot. This would enable you to reload the firmware through the process used to upgrade through U-Boot. This is explained in the "Upgrade to LininoIO" tutorial.

As stated before I have never had the opportunity to use a Yun and so please take my advice with a grain of salt.

Good luck.

SantinoPrice, you were right!!

I thought it wouldn’t be possible to do it because of, that the ethernet conection didn’t appear in the Arduino IDE. But after see your comment I remembered that for reflashing the (U-boot, kernel and roofs) the files are gotten from a TFTP server, giving the Yun an free IP.

So thank you very much.

Now I have installed the LininoOS, that is a version of openWRT, but I want to reinstall the original version ‘openWRT-Yun’.

What would be the best way considering that the (U-boot, kernel and roofs) are versions for LininoOS.

1- WLAN RESET for 30 seconds, and update to the last OpenWRT-Yun image following this link and after that, upgrade the (U-boot, kernel and roofs) for this version following this link
2- Directly update to the last OpenWRT-Yun image following this link and after that, upgrade the (U-boot, kernel and roofs) for this version following this link

Thanks

I am not sure as to what would be best in that situation. Personally i would first replace the U-boot, then kernel and finally reload Openwrt yun.

I am not sure if the instructions here are complete but they should give you a good starting point.

Try to get advice from someone that has actually gone through the procedure. Making a mistake with the uboot can potentially render the board useless.

I think you are right, but as you said, it's better to be sure, so I have opened another post.

Upgrade from LininoOS to OpenWRT-Yun