|
楼主 |
发表于 2006-12-4 08:57:49
|
显示全部楼层
对于6.2-x,改起来其实更简单,只需要改init.c就可以了。
下面是我改的init.c中的mountlfscd()部分:
[code:1]int mountlfscd(void)
{
char buf[ISO_BLOCK_SIZE];
/* Try to mount the cd drive*/
mount("/dev/hda8", "/hda8", "ext3", 0, 0);
losetup("/dev/loop2", "/hda8/root.iso", O_RDONLY);
mount("/dev/loop2", CDROM_MOUNT, CDROM_FSTYPE, MS_RDONLY, NULL);
/* If we're here, we definitely have the LiveCD mounted at the mount point :) */
memset(buf, 0, 32); /* Clear buffer so we don't have to check read's status */
/* YAY! we have the LFS LiveCD mounted :) */
lfscd = "/dev/loop2";
return(1);
}
[/code:1] |
|