Site Tools


change_root

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
change_root [2012/02/21 01:06] – typos excogitationchange_root [2012/02/23 00:59] (current) – [How to recover a broken rootfs or an unbootable bootimg] armelf
Line 1: Line 1:
 +====== How to recover a broken rootfs or an unbootable bootimg ======
 +
 +DRAFT
 +
 +Don't panic, there are solutions buried to go back on the right way, especially of if you have made [[backups|backups]] of your partitions.
 +
 +This methods are necessary until a true bootloader like [[uboot|u-boot]] or GRUB will be ported on the AC100.
 +===== Chroot =====
 +
 no idea if someone else finds this useful ... in case: no idea if someone else finds this useful ... in case:
  
Line 11: Line 20:
  
  - Unmount the partition you want to chroot to:  - Unmount the partition you want to chroot to:
-  <code>+<code>
   sudo umount /media/<mointpoint of the desired partition>   sudo umount /media/<mointpoint of the desired partition>
-  </code>+</code>
   e.g. sudo umount /media/6ca3f514-dc34-4230-a997-ebe156d108c0   e.g. sudo umount /media/6ca3f514-dc34-4230-a997-ebe156d108c0
  
  - mount that partition to /mnt:  - mount that partition to /mnt:
-  <code>+<code>
   sudo mount /dev/<desired partition (unmounted above)> /mnt   sudo mount /dev/<desired partition (unmounted above)> /mnt
-  </code> +</code> 
-  e.g. sudo mount /dev/mmcblk0p7 /mnt+  e.g. **sudo mount /dev/mmcblk0p7 /mnt** for rootfs installed in eMMC
  
  - mount additional stuff (dev/sys/proc):  - mount additional stuff (dev/sys/proc):
-  <code>+<code>
   sudo mount -o bind /dev /mnt/dev   sudo mount -o bind /dev /mnt/dev
   sudo mount -o bind /sys /mnt/sys   sudo mount -o bind /sys /mnt/sys
   sudo mount -t proc /proc /mnt/proc   sudo mount -t proc /proc /mnt/proc
-  </code>+</code>
  
  - chroot  - chroot
-  <code>+<code>
   sudo chroot /mnt /bin/bash   sudo chroot /mnt /bin/bash
-  </code>+</code>
  
 You can now tweak your system. (e.g. you can install additional stuff from the repositories, You can now tweak your system. (e.g. you can install additional stuff from the repositories,
Line 46: Line 55:
 </code> </code>
  
 +==== Chroot from initramfs ====
 +
 +TODO based on initramfs of Ubuntu bootimg.
 +===== Flash another kernel =====
 +
 +if for an unknow reason [[http://ac100.grandou.net/sosboot|SOSBOOT]] is unable to read your rootfs (for example NILFS2 or BTRFS filesystem) just after flashing a new kernel with a filesystem module which isn't loaded by **initrd**, you ended with an unbootable system and you are in chicken-egg trouble... One possible solution, is to [[kerneldev?&#Compilation environment consideration|rebuild a kernel]] with this filesystem type module builtin. Then backup your broken partition 6 image with [[putusb|putusb]] or [[nvflash|nvflash]]. Make a copy of this backup and use [[abootimg|abootimg]] to update it with this new kernel:
 +  
 +<code>
 +abootimg -u /tmp/copy-of-partition_6.img -k .../arch/arm/boot/zImage
 +</code>
 +
 +and download it back to your AC100 with [[putusb|putusb]] or [[nvflash|nvflash]], then reboot and correct your rootfs or your bootimg according to make again bootable your AC100 with the last refinement.
change_root.1329782814.txt.gz · Last modified: 2012/02/21 01:06 by excogitation