Forum

Full Version: Xbian Beta 2 and BTRFS problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I have Xbian Beta 2 and BTRFS, a script that went bad modified my /etc/passwd and /etc/shadow files and they were renamed. They are still there but renamed.
The thing is that I installed a computer with Debian Wheezy in order to mount the SDCARD but Wheezy does not have the same version of btrfs-tools as the sdcard (sdcard has newer beta/unstable tools) so I cannot mount the btrfs partition.

what are my options?
I can boot my raspberry with the sdcard, but no operations can be performed because i cannot validate a user (no ssh for example).
What can I do to modify my cmdline.txt in order to boot in single mode?

thanks,

Terminal

sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootflags=subvol=root/@,autodefrag,compress=lzo rootfstype=btrfs rootwait smsc95xx.turbo_mode=N elevator=cfq logo.nologo quiet noswap loglevel=0 mod_scsi.scan=sync partswap startevent=mountall splash nohdparm --startup-event mountall
1) standard linux param: init=/bin/bash
2) in config.txt uncomment initramfs.gz, put "rescue" into cmdline.txt
(17th Jan, 2014 02:06 PM)mk01 Wrote: [ -> ]1) standard linux param: init=/bin/bash
2) in config.txt uncomment initramfs.gz, put "rescue" into cmdline.txt

Thanks for your help mk01,

So, config.txt becomes?:
Terminal

#initramfs initramfs.gz 0x00a00000
gpu_mem_512=128
gpu_mem_256=128
initial_turbo=1
disable_splash=1
arm_freq=840
core_freq=275
sdram_freq=400
over_voltage=0

And cmdline.txt becomes?
Terminal

sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootflags=subvol=root/@,autodefrag,compress=lzo rootfstype=btrfs rootwait smsc95xx.turbo_mode=N elevator=cfq logo.nologo quiet noswap loglevel=0 mod_scsi.scan=sync partswap startevent=mountall splash nohdparm --startup-event mountall rescue

Where do I put init=/bin/bash?
@ErickP,

easiest is it edit from the place you have cursor Wink just the begging of the line. there is no "magic sequence" or something so

case 1
Code:
rescue sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 ……….

case 2
Code:
init=/bin/bash sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 ……….

"rescue" is XBians initramfs rescue shell. for it to work, initramfs.gz needs to be uncommented in config.txt
Code:
#initramfs initramfs.gz 0x00a00000
gpu_mem_512=128
….

changes to

Code:
initramfs initramfs.gz 0x00a00000
gpu_mem_512=128
….

init=XYZ is default linux kernel command line parameter and is telling what init binary should be loaded from rootfs as first. for init= doesn't matter if you boot with or without initramfs.gz as linux kernel will understand it and launch it as well.

[i]and with init=/bin/bash you will be dropped exactly to your / with uid=0 rights. after you finishes, do "sync; reboot -fn". normal reboot nor halt will function as this mode is single user level (without runlevel controls)
Reference URL's