Ferrets家的Wordpress

杂记

chroot

gnome-terminal无法创建该子进程

2012年5月13日 by Ferrets Leave a Comment

最近在自家的路由上装起了fluxbox啊!各种强力啊!!

可是装上了fluxbox之后必须要跑的就是终端啊,这样就可以在没有外部干扰的情况下执行一些需要比较多时间的操作了。

不过在跑终端的时候还是遇到了问题,嗯,似乎是pts的问题,上网找了一下,找到了一个结局方案。

————————————————————————————————————————-
一下内容来自http://blog.chinaunix.net/space.php?uid=20357359&do=blog&id=1963423

今天中午睡醒之后,闲着没事,就想升级一下自己的系统吧。

apt-get dist-upgrade

因为升级了内核,我就重启了一下,结果发现桌面边成了1280×1024的了,不错!

但是我感觉系统好像慢了很多,尤其是gnome-terminal尤其的慢,连个ls也要很长时间。

再次重启,运行gnome-terminal的时候,弹出对话框:无法创建该子进程。

刚开始我以为是gnome-terminal的装的有问题,apt-get install gnome-terminal –reinstall。
结果依旧,现在我才开始意识到问题的严重性。

难道是gnome-terminal和其他程序冲突,例如gnome-pannel,重装gnome-pannel无果。

安装一下其他的X下的终端模拟器试一下,apt-get install konsole。
启动konsole,弹出对话框:
“Konsole is unable to open a PTY (pseudo teletype). It is likely that this is due to an incorrect configuration of the PTY devices. Konsole needs to have read/write access to the PTY devices.”

看来不是gnome-terminal的问题,那到底是什么问题呢?

google了一番,终于找到了跟我有相同问题的人:
http://kanotix.com/PNphpBB2-viewtopic-t-21461.html
竟然是同一天,老外也太快了。
方法1:

apt-get install initscripts/testing
(reboot)
如果已经安装了,可以尝试重新安装:apt-get install initscripts –reinstall
方法2:[未测试]
I added this line to my fstab:
devpts /dev/pts devpts gid=5,mode=620 0 0
and it seemed to do tthe trick.

原因分析:
http://forums.fedoraforum.org/archive/index.php/t-134006.html

——————————————————————————————————–

因为我的debian是chroot来的,于是多加上了一句

none /proc proc defaults 0 0

Posted in: Linux Tagged: chroot, Debian, OpenWrt

感动啊……终于成功做出固件,成功的chroot到debian了

2012年5月11日 by Ferrets 2 Comments

很久以前就看到这个openwrt可以chroot到debian,想着,弄一个来玩玩啦,文章在已经记录在这里。

可惜的是,因为这设备的缺陷(Buffalo WZR-HP-AG300H),没有FPU,导致需要启用FPU仿真,而很可惜的是,官方发布的固件都不会加上这个选项。不得不自己动手做一个。

自己做固件有相当一段时间了(其实也就一个月左右),之前的源码的话编译总是不成功。做不出来固件。直到最近,成功的做出了固件,然后自己当了一会小白鼠,直接刷上了。很幸运的是,没有变砖。可惜的是,因为做固件的时候没有选上某些kernel mod ,导致功能上的残缺。

于是又重新做了一个。这回没有问题了。

接下来的问题是,在debootstrap过程中, 缺少了device.tar.gz导致装不完全((这个很蛋疼,我试过在这里直接chroot,结果passwd都没有,用户名是“I have no name!”,连apt都没有),这时候只要找到debootstrap,打开,找到里面的devic.tar.gz,放到指定位置就好了。

Posted in: Linux Tagged: chroot, Debian, OpenWrt

[转载]用debootstrap在openwrt上安装debian squeeze,构建编译环境

2012年5月11日 by Ferrets Leave a Comment

来源:http://www.openwrt.org.cn/bbs/forum.php?mod=viewthread&tid=2801&highlight=debootstrap

用到的相关软件:
debootstrap binutils objdump libbfd
1、opkg 安装 objdump
因为debootstrap安装debian时,需要用的dpkg或者ar来解包deb软件包,考虑到dpkg安装需要的空间较大,转用ar,而ar在binutils软件包中,ar的运行需要libbfd库支持。因此先安装objdump,连支持库libbfd也安装了
[email protected]:~#opkg update
[email protected]:~#opkg install objdump
2、解包binutils,获得ar可执行文件
opkg安装binutils需要6M多的空间,而我们只需要其中一个ar,所以我只解包取出其中的ar文件
[email protected]:~#mkdir /mnt/sda1/temp
[email protected]:~#cd /mnt/sda1/temp

wget取得binutils_2.19.1-3_brcm63xx.ipk

[email protected]:/mnt/sda1/temp# wget … 19.1-3_brcm63xx.ipk

解包binutils_2.19.1-3_brcm63xx.ipk (ipk包实际只是个tgz包,可以用tar解开)

[email protected]:/mnt/sda1/temp# tar zxvf binutils_2.19.1-3_brcm63xx.ipk

解包 data.tar.gz ,获得ar

[email protected]:/mnt/sda1/temp# tar zxvf data.tar.gz

解开后,当前目录usr里面有bin mips-openwrt-linux-uclibc/bin两层目录,里面都有ar,我用了mips-openwrt-linux-uclibc/bin/ar

复制ar到/usr/bin里

[email protected]:/cp usr/mips-openwrt-linux-uclibc/bin/ar /usr/bin

试试ar能否执行

[email protected]:/mnt/sda1/temp# ar
Usage: ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file…
ar -M [<mri-script]
commands:
ar 搞掂了
3、安装debootstrap
debootstrap在RC-4的源上有,需要修改opkg设置
[email protected]:/vi /etc/opkg.conf
###将源修改为下面地址,保存
src/gz packages … 4/brcm63xx/packages
###安装debootstrap
[email protected]:/opkg updat
[email protected]:/opkg install debootstrap
###安装完后,最好修改原来的源地址设置。
4、安装debian
[email protected]:~# mkdir /mnt/sda1/debian_mips
[email protected]:~# debootstrap –arch=mips –variant=minbase squeeze /mnt/work/debian/ http://ftp.cn.debian.org/debian/

*注:如果遇到没有device.tar.gz,下载devices.tar.gz

###等等等。。。。。若干十分钟后,安装完成后,就有了一个debain了。
5、chroot进行debian
[email protected]:~#mount -o bind /proc /mnt/sda1/debian_mips/proc
[email protected]:~#mount -o bind /dev /mnt/sda1/debian_mips/dev
[email protected]:~#chroot /mnt/sda1/debian_mips /bin/bash
###chroot后,apt-get update,mount磁盘。。。等等等等,之后的事情,就看你的需要了。。。exit退回openwrt环境。

Posted in: OpenWrt Tagged: chroot, Debian, debootstrap, OpenWrt

搜索站点

日历

2023年 3月
一二三四五六日
 12345
6789101112
13141516171819
20212223242526
2728293031 
« 1月    

分类

  • Android
  • docker
  • Linux
  • OpenWrt
  • OPNsense
  • Proxmox
  • RaspberryPi
  • RouterOS
  • Windows
  • 吐槽
  • 未分类
  • 生活
  • 网络
  • 自建服务

近期文章

  • 使用OPNsense来保护内网的服务
  • Mikrotik RB750Gr3优化配置,跑(差点)满千兆
  • 用smartdns来防治DNS污染
  • Proxmox中LXC容器中docker调用宿主机的显卡加速
  • Linux上iptables端口触发拦截
  • 通过DHCP指定mtu
  • openwrt 国内镜像源
  • 为RDP启用显卡加速,提升远程桌面效果
  • 为proxmox启用intel核显的虚拟化
  • windows无法解析域名

友链

  • ntzyz's space
  • Openwrt中文论坛
  • SNGR
  • Trevikids行止由心
  • 煎蛋

归档

管理

  • 登录
  • 条目feed
  • 评论feed
  • WordPress.org

Copyright © 2023 Ferrets家的Wordpress.

Omega WordPress Theme by ThemeHall